Heaven/TQA Posted May 14, 2015 Share Posted May 14, 2015 Is there any way to bypass as much as possible of the OS? On XL I am switching off OS easily and have full control but on 400/800? How do games like RoF, ball blazer etc get much control? I mean normal OS does get many ZP plus all shadow registers etc? Quote Link to comment Share on other sites More sharing options...
phaeron Posted May 14, 2015 Share Posted May 14, 2015 You can't turn off the OS ROM to take over the CPU interrupt vectors on a 400/800, so the best you can do is to grab the VIMIRQ, VDSLST, and VVBLKI OS vectors. That gets you both IRQ and NMI and frees up all memory except a handful of bytes in page two. Unless you're pinching cycles or need the extra RAM, this can be a more compatible way to go. The most painful difference is an extra 5-9 cycles on the DLI path. One important gotcha if you're doing time sensitive IRQs: the XL/XE OS has an extra CLD instruction prior to JMP (VIMIRQ) that OS-B doesn't. Quote Link to comment Share on other sites More sharing options...
tschak909 Posted May 14, 2015 Share Posted May 14, 2015 This is actually done to a great extent with the Educational Master Cartridge, so that it can grab every cycle for itself to decode the tape format. -Thom Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted May 14, 2015 Author Share Posted May 14, 2015 (edited) thx will have a look and give it a try. Will also look at commercial games how they did it esp. Lucasfilm ones. The older machines caught somehow my interest... Now on the list is the 800.... Edited May 14, 2015 by Heaven/TQA Quote Link to comment Share on other sites More sharing options...
Rybags Posted May 14, 2015 Share Posted May 14, 2015 (edited) Interesting ones you could look are cart games that run in diagnostic mode - Star Raiders and Asteroids are 2 early examples. I also believe both of those were written to only use the first 8K RAM. The thing there though is that the cart then has to perform system initialization itself so it becomes a tradeoff. It also becomes easy to have problems with the XL OS, unsure if any games have that issue. Later carts (Donkey Kong?) take a better route - allow the OS to do early initialization, have the cart just take control via it's INIT vector but don't return. Where you can have pitfalls with using that low memory is warmstart failing - best bet is sometimes to just set the COLDST ($244) flag nonzero. Then it prettymuch becomes a case of having free reign, only exceptions: - allow some stack area for subs/interrupts/parameters. - Immediate IRQ, Immediate VBlank, optionally deferred VBlank vectors $216-7, $222-3, $224-5, Coldst flag $244. Edited May 14, 2015 by Rybags Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted May 14, 2015 Author Share Posted May 14, 2015 I have some 5200 code which I want to prepare for 400/800. The 5200 bios has same mini kernel we use in general on XL when switching off OS Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.