Pages

Saturday, 5 March 2016

No walk in the park.

I'm currently working on getting the player walking so that I can move from room-to-room to test all elements of the game. There's quite a bit of code required, including sprite update handlers for multiple sprites, plus collision-detection (optional at this point) and out-of-bounds calculations (some of which are crucial). These routines are used for any objects which do, or can be, moved. By the end of tonight's session, I can actually turn and move, although there's still more code to port and some bugs to iron out.

One routine in particular, which calls a bunch of lower routines, makes heavy use of the Z80 registers. For this purpose I've defined an offset into the Direct Page for each Z80 8-bit register. Outside this branch of code, however, I've seldom had to resort to using them.

And tonight I also reviewed some earlier code and found a couple of instances where I could replace 2 instructions with a single instruction using Indirect Addressing. Another tick for the 6809!

There's still a bit of code to port for the movement, plus I need to implement sprite wiping, and then implement the logic for exiting and entering screens. Until then, there won't be much to show for my efforts.

It's the weekend now and I should probably take the opportunity to explore Fremont and its surrounds, rather than sit in front of my laptop and code 6809 assembler. The Computer History Museum in Mountain View is on the cards, and I do believe they have a Coco on display! I should donate a Knight Lore cartridge to them when I'm done, just to confuse ZX Spectum enthusiasts! ;)

No comments:

Post a Comment