View Single Post
Old 03 June 2016, 00:38   #2
Galahad/FLT
Going nowhere
 
Galahad/FLT's Avatar
 
Join Date: Oct 2001
Location: United Kingdom
Age: 50
Posts: 8,994
Quote:
Originally Posted by alpine9000 View Post
Hi,

So I am almost finished my first game which is a trackloaded direct hardware game.

But it would seem kids these days like to load stuff from hard drive so I thought I would do a workbench version also. Luckily the way I wrote the game made it fairly easy to get a version up and running.

I changed all of my sections to chip ram using vlink, so the loader just loads everything into chip ram (the trackloaded version runs in 512kb, but the workbench version loads everything so it takes about 650kb of chip ram). The routines that would track load stuff from disk just copies it around in ram in the workbench version.

I wrapped my entry point using Photon's startup code.

I grabbed the workbench message port handling code from Howtocode5.txt.

And everything seems to save/restore pretty well.

So far I have noticed two things:

(1) If I am playing a module before I run the game, it will not be running when I return. A start and stop on the player will get it going again. Not sure if this is normal or I am not restoring something.

(2) If I launch the game from a floppy in workbench, the drive motor doesn't stop. Not sure how to deal with this one. Any ideas ? I know how to turn of the drive motor, it's just that it could be any drive and when launched from HD wouldn't be needed.

Are there any other tests people can suggest to make sure I am cleaning up correctly ?
To stop the drive motor, you can either write the relevant bits to the drive motor registers, or, just have a small delay after the last floppy access which gives the drive more time to finish and switch off itself.

Waiting 3 seconds should be enough, obviously the delay should occur before you take over the system.
Galahad/FLT is offline  
 
Page generated in 0.04269 seconds with 11 queries