peteym5 Posted January 22, 2018 Share Posted January 22, 2018 I ran into a snag with getting one of my upcoming cartridge games to run on the 400/800 in emulation, would imagine it will be an issue on real hardware as well. Appears the 400/800 OS checks memory location $9FFC to see if it is 0, if it is, it attempts to run the cartridge at $9FFE, $9FFF. I am not sure is this is something we need to watch out for when making cartridges and like games to run on the 400.800. I had some data stored at that address and it just happened to have a 0 stored there, solution was just bump up the data address a few bytes. Anybody know anything about this? I am glad I caught this one before the cartridge went into production. I know very few have 400/800 computers unmodified, but it better to be safe with these things now. Quote Link to comment Share on other sites More sharing options...
a8isa1 Posted January 22, 2018 Share Posted January 22, 2018 (edited) 400/800 OS checks memory location $9FFC to see if it is 0, if it is, it attempts to run the cartridge at $9FFE, $9FFF. Ah. I didn't know that's what was being checked. When I had an SRAM cartridge, which was fixed at 16K, I had trouble running 8K images. I discovered if I mirrored the data of $BFFA-$BFFF to $9FFA it would work. Only posting because my experience seems to confirm what you are seeing Edited January 22, 2018 by a8isa1 1 Quote Link to comment Share on other sites More sharing options...
SS Posted January 22, 2018 Share Posted January 22, 2018 I know very few have 400/800 computers unmodified, but it better to be safe with these things now. I don't know if I'd say that. I know of quite a few people who use stock 400/800s as their primary machines. I'd also wager that a great many of the people who use modded machines also have an unmodded one as a back-up. 1 Quote Link to comment Share on other sites More sharing options...
Kyle22 Posted January 23, 2018 Share Posted January 23, 2018 Or an Incognito which may be switched between 800 and XL/XE mode. 3 Quote Link to comment Share on other sites More sharing options...
peteym5 Posted January 25, 2018 Author Share Posted January 25, 2018 The whole purpose of my "16K for 16K" series of games is to ensure games run on as many Atari 8-bit and 5200 machines as possible. 16K ROM running on machines with 16K RAM, no OS version specific dependencies, and allow them to be ported over to the 5200. I know just about everyone has their machines expanded to 48K or more. With the aid of deflate/inflate, I am able to compact games that would require over 20K on a cartridge ROM. They are less expensive to make than larger games that need bank switching or flash cartridges. 1 Quote Link to comment Share on other sites More sharing options...
VladR Posted January 25, 2018 Share Posted January 25, 2018 Is the 20 KB->16 KB compression ratio a typical number you usually get across multiple games or just a special occurrence? What kind of compression ratio you get just for code? Quote Link to comment Share on other sites More sharing options...
peteym5 Posted January 25, 2018 Author Share Posted January 25, 2018 Inflate is about 1.6 to 1.8 to 1. Only the parts that I need to load into RAM are normally compressed. How much varies between each game, some games only expand a section depending what is going on. Venture was almost a 32K game that I had to optimize some to get it down to about 27K, before compressing it into a 16K cartridge. 1 Quote Link to comment Share on other sites More sharing options...
VladR Posted January 25, 2018 Share Posted January 25, 2018 1.6:1 sure sounds great! Did you write your own LZE depacker or is there a library available on 6502 ? How long does it take to unpack, say, 16 KB ? Quote Link to comment Share on other sites More sharing options...
tep392 Posted January 25, 2018 Share Posted January 25, 2018 The process of checking for carts in the left or right slot by looking for 0 in 9FFC and BFFC is well documented in books like Mapping the Atari. De Re Atari has a good flowchart of the boot process. I like to reserve 9FFC with a non-zero value so I don't run into any surprises as things move around while I edit/debug code. 1 Quote Link to comment Share on other sites More sharing options...
peteym5 Posted January 26, 2018 Author Share Posted January 26, 2018 1.6:1 sure sounds great! Did you write your own LZE depacker or is there a library available on 6502 ? How long does it take to unpack, say, 16 KB ? Nope "Inflate/Deflate" compression is something entirely different. http://atariage.com/forums/topic/264720-inflatedeflate-improving-the-speed-of-decompression/?hl=inflate&do=findComment&comment=3792369 If you downloaded MADS assembler package, look under examples -> compression, there you see inflate. Widely available and well use for Atari programmers. I was recently involved with some modifications that improved the speed it deflates (expands) into RAM. 1 Quote Link to comment Share on other sites More sharing options...
VladR Posted January 26, 2018 Share Posted January 26, 2018 Thanks. This is very useful! 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.