Castle Queen

Discussion, Reviews & High-scores

Moderator: Moderators

User avatar
freshlamb
Vic 20 Dabbler
Posts: 76
Joined: Sun Apr 04, 2004 5:38 pm
Website: http://www.rufnoiz.com
Location: Prince Albert SK Can

Castle Queen

Post by freshlamb »

I have been quite quiet lately, sorry for that, but I have continued to program. Pretty happy with this. No memory expansion.

Collect the keys, avoid the robots and get to the exit.

5 little sprites, isometric platformer, 4 levels.

My web pages are a complete mess, so this is a direct link. I will fix it if I ever get everything straightened up.

Click the game icon for the zip file.

http://www.rufnoiz.com/ajkj/a97.html

Image
User avatar
chysn
Vic 20 Scientist
Posts: 1205
Joined: Tue Oct 22, 2019 12:36 pm
Website: http://www.beigemaze.com
Location: Michigan, USA
Occupation: Software Dev Manager

Re: Castle Queen

Post by chysn »

freshlamb wrote: Sat Oct 02, 2021 3:10 pm No memory expansion.
With no memory expansion, attaching the TAP file and loading, I eventually wind up with this and a CPU jam in VICE. I'm never sure how to get something like this over to my real VIC.
Screen Shot 2021-10-02 at 11.56.17 PM.png
VIC-20 Projects: wAx Assembler, TRBo: Turtle RescueBot, Helix Colony, Sub Med, Trolley Problem, Dungeon of Dance, ZEPTOPOLIS, MIDI KERNAL, The Archivist, Ed for Prophet-5

WIP: MIDIcast BASIC extension

he/him/his
User avatar
freshlamb
Vic 20 Dabbler
Posts: 76
Joined: Sun Apr 04, 2004 5:38 pm
Website: http://www.rufnoiz.com
Location: Prince Albert SK Can

Re: Castle Queen

Post by freshlamb »

Yeah. I had to use the cassette buffer and a few other places for memory, so the overwrite on the screen is normal. But looking at the characters on the screen something isn't loading right. I'll check the zipped TAP.
User avatar
freshlamb
Vic 20 Dabbler
Posts: 76
Joined: Sun Apr 04, 2004 5:38 pm
Website: http://www.rufnoiz.com
Location: Prince Albert SK Can

Re: Castle Queen

Post by freshlamb »

I downloaded and tried the zipped TAP on Xvic (VICE 2.4) and had no problems. It should load from 4097 to 7873. Comparing the screen I get, and your screenshot, I see the program is loading 3 bytes higher than it should. Not sure why.
User avatar
Mike
Herr VC
Posts: 4816
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: Castle Queen

Post by Mike »

As a means of data transfer, *.tap files aren't the ideal choice, especially not when the program/game had been developed in emulation in first place. Their quasi-analogue nature makes them unreliable for reading back, this is more apparent when different versions of VICE are in play.

I needed half a dozen tries with my copy of xvic (3.1 x86 r34289) to successfully load the game.

You might consider providing the game as files in a *.d64 or as collection of *.prg files in a *.zipped directory folder. That will most probably require you to use the proper KERNAL calls SETLFS, SETNAM and LOAD to access named files - simply doing the equivalent of "POKE631,131:POKE198,1:END" with tape to load the next part in direct mode won't work anymore.

The game seems to use NTSC settings for the VIC registers.

That being said, it's a nice 3D game, somewhat in the spirit of Crystal Castles. Me want more levels! :mrgreen:
User avatar
chysn
Vic 20 Scientist
Posts: 1205
Joined: Tue Oct 22, 2019 12:36 pm
Website: http://www.beigemaze.com
Location: Michigan, USA
Occupation: Software Dev Manager

Re: Castle Queen

Post by chysn »

OK, in VICE the trick was to attach the "A" file instead of the "B" file. That one works fine.

It's a good game! Way better than the Parker Bros. VIC-20 port of Q*Bert! The control is a bit challenging at first, but a 45-degree turn of the joystick does the trick.

I'll be able to get it to tape using CBM Shell, and I'll try it with real hardware.

Follow-Up: A Mike noted above, the TAP file isn't quite reliable on VICE. On a subsequent attempt, it just broke to the READY prompt after loading. Third attempt, same thing. I might need to record to real tape to get it back...
User avatar
javierglez
Vic 20 Hobbyist
Posts: 107
Joined: Sat Jun 03, 2017 3:33 pm

Re: Castle Queen

Post by javierglez »

I'm using VICE 3.5 (GTK3 3.24.24, GLib 2.66.3)
It loads OK if I leave it on its own, but if I turn on warp to speed up loading, it doesn't.

Good game I finished all the levels too.
I didn't know about Cristal Castles even if isometric is my favourite style of graphics.
User avatar
freshlamb
Vic 20 Dabbler
Posts: 76
Joined: Sun Apr 04, 2004 5:38 pm
Website: http://www.rufnoiz.com
Location: Prince Albert SK Can

Re: Castle Queen

Post by freshlamb »

This is really disappointing news about TAP files, as I was my favorite way to store my games.

I forgot there are a couple of things that set the screen for NTSC. For VICE emulators it's not a big deal, but I suppose a pain to have to change settings.

The levels... I simply ran out of room. As it is level3 is pretty cheap, and I stored level4 in the top part of the input buffer. I didn't even have room to display 'game over' after you exhausted 3 players. That's what CastleQueenB is, 4 alternate levels. They are a bit harder. But my goal was to cram all of this into an unexpanded machine. Obviously there were sacrifices.

I finished this the end of August. There were several things I wanted to include that got cut. So I started Super Castle Queen...
User avatar
chysn
Vic 20 Scientist
Posts: 1205
Joined: Tue Oct 22, 2019 12:36 pm
Website: http://www.beigemaze.com
Location: Michigan, USA
Occupation: Software Dev Manager

Re: Castle Queen

Post by chysn »

freshlamb wrote: Sun Oct 03, 2021 11:15 am This is really disappointing news about TAP files, as I was my favorite way to store my games.
I don't think it's TAP files in general. I've been using TAP files pretty extensively recently, and they're always perfectly well-behaved. There's no reason they should ever vary in VICE (I'm in 3.5). Maybe there's some IRQ thing that happens that depends upon or is affected by a timer in some way? That's the only way I can explain the load behaving differently each time, and finding novel ways to fail.

Here's an outline of the process, and what I've seen happen:

(0) SEARCHING (counter 000 - 004), FOUND "CASTLE QUEEN" (counter 004)
(1) All-white screen that says "LOADING." at the top (counter 006 - 014) [popped back to READY prompt]
(2) All-blue screen that says "AJ&KJ CASTLE QUEEN" with "AJ&AJ" changing colors. (counter 014) [CPU jam]
(3) After pressing F1, "LOADING." is added to top of the screen (counter 014 - 031)
(4) All-cyan screen that says "97 CASTLE QUEEN BY KURT JOHNS etc." (counter 031)
(5) After pressing F1, a bitmapped image of the Queen finding the key, pursued by a ghost (counter remains 031)
(6) After pressing F1 again, "PLEASE WAIT." (counter 031 - 47) [popped back to READY]
(7) The screen half-fills with junk, but loading continues (counter 047 - 058) [CPU jam, popped back to READY]

By far, the most common issue is CPU jam at step 7, just when everything seems OK!

I'm going to copy each component over to tape and try this on a real VIC. I'll report back...

An error in the code would be good news, because it means it can be fixed.
VIC-20 Projects: wAx Assembler, TRBo: Turtle RescueBot, Helix Colony, Sub Med, Trolley Problem, Dungeon of Dance, ZEPTOPOLIS, MIDI KERNAL, The Archivist, Ed for Prophet-5

WIP: MIDIcast BASIC extension

he/him/his
User avatar
chysn
Vic 20 Scientist
Posts: 1205
Joined: Tue Oct 22, 2019 12:36 pm
Website: http://www.beigemaze.com
Location: Michigan, USA
Occupation: Software Dev Manager

Re: Castle Queen

Post by chysn »

Well... I don't really know how this works. Apparently the first file, "CASTLE QUEEN" isn't right on my tape. I have a header for $02F8. When I load the program in VICMon, it looks like this:
IMG_4856.jpg
The first big difference I'm seeing is that when I LOAD this with VICE, it starts the rest of the load process. When I do the same on my real VIC, it just goes back to READY when it's done.

Can you kindly verify that the first file is OK, as shown above?
User avatar
beamrider
Vic 20 Scientist
Posts: 1447
Joined: Sun Oct 17, 2010 2:28 pm
Location: UK

Re: Castle Queen

Post by beamrider »

In my experience differences between VICE and real hardware are due to relying on uninitialized memory which I think is zeroed in VICE but random on the Vic.
User avatar
freshlamb
Vic 20 Dabbler
Posts: 76
Joined: Sun Apr 04, 2004 5:38 pm
Website: http://www.rufnoiz.com
Location: Prince Albert SK Can

Re: Castle Queen

Post by freshlamb »

The first program loads over the vectors including the IRQ which will now point to a new loader (I'm away from home so I'm not 100% sure of the location) probably at 820. It puts back the default IRQ vector, changes the screen a bit, and loads AL which is the AJ display.

I have used this program on all of my games on the vice emulator and my real vics and never encountered a problem. When I have time I'm just going to make a D64. I think most people have the SD card reader anyway.
User avatar
Mayhem
High Bidder
Posts: 3026
Joined: Mon May 24, 2004 7:03 am
Website: http://www.mayhem64.co.uk
Location: London

Re: Castle Queen

Post by Mayhem »

chysn wrote: Tue Oct 05, 2021 7:53 am I don't think it's TAP files in general. I've been using TAP files pretty extensively recently, and they're always perfectly well-behaved. There's no reason they should ever vary in VICE (I'm in 3.5). Maybe there's some IRQ thing that happens that depends upon or is affected by a timer in some way? That's the only way I can explain the load behaving differently each time, and finding novel ways to fail.
I encountered a few problems with TAP inside Gamebase20, turns out the VICE team tightened up the allowable TAP signal error handling in 3.x versions so a few of the TAP I had (or made myself) that loaded fine in VICE 2.4 failed with load error thus on 3.0 when it launched.
Lie with passion and be forever damned...
User avatar
Mike
Herr VC
Posts: 4816
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: Castle Queen

Post by Mike »

freshlamb wrote:The first program loads over the vectors including the IRQ which will now point to a new loader (I'm away from home so I'm not 100% sure of the location) probably at 820.
I honestly wonder how this is supposed to work.

Including $0314/$0315 into a memory area saved on tape will not write the original vector value or any user defined value there. Rather, the tape save routines install an own vector value during the tape operation, which happens to be specific for tape write. So, what actually gets written to tape is that 'tape write' value in $0314/$0315.

Upon tape load the KERNAL installs yet another temporary value in $0314/$0315 to control the timing of the tape routines. This one now gets overwritten by the value put on tape that had been specific to the write operation (and which neither is the standard IRQ nor the user defined value before tape save!).

Which is much akin to throwing a wrench into a gearbox.

If you want to produce an autostart with the first file on tape, try using $0302/$0303 instead (with the payload placed into the tape buffer by an over-length file name). A save with ",1,1" then forces the load address. See here for an example.
User avatar
freshlamb
Vic 20 Dabbler
Posts: 76
Joined: Sun Apr 04, 2004 5:38 pm
Website: http://www.rufnoiz.com
Location: Prince Albert SK Can

Re: Castle Queen

Post by freshlamb »

My apologies Mike, that's exactly what it does. It changes the vector at $0302. But the code starts at 820. I made a little program that just gets the file name and saves this loader, so I actually haven't looked at the code for years.
Post Reply