Dissy614 Posted January 22 Share Posted January 22 I came across a situation with the a7800 emulator (v5.2) that surprised me, and was wondering if this is expected behavior or not. Specifically regarding the "cart type" bytes in the .a78 header, bit 1 "supergame bank switched" and bit 2 "supergame RAM at $4000" It seems when bit 2 is on to enable RAM and bit 1 is off, a7800 does not actually enable the RAM. With both bits on, it does. While working on a 7800basic project I added a line for "set romsize 32kRAM", which sets bit 1 off and bit 2 on, as this configuration does not use bank switching but should support RAM, but was not honored by the emulator. My next test was to use "set romsize 128kBANKRAM" as that is the smallest size supported with bank switching, however 7800basic did not enable bit 2 of the header to enable RAM. I suspect that's a bug in 7800basic. (I'm using v0.20 which is a version or two behind, but the changelog doesn't mention this issue) Because my final test was to include two romsize lines in my program, first "set romsize 32kRAM", and right after "set romsize 128kBANKROM" For the purposes of assembly the second option took precedence as expected and set bit 1, but for some reason the first option is what changed the a78 header being written to include bit 2 set as well. At this point a7800 worked as expected, adding RAM at $4000, and with bank switching enabled. This is what lead me to suspect a7800 ignores bit 2 (RAM) if bit 1 isn't set, possibly (mis)assuming one has a dependency on the other. On one hand I might just be missing something I should be doing to "force" RAM support without bank switching in the emulator. On the other hand I had really hoped to keep my development environment as close to the intended hardware I was going to use. On a third hand, enabling bank switching even if not currently used does sound like a wise practice I should be adopting... (On a forth hand, I might need to borrow some more hands!) Quote Link to comment Share on other sites More sharing options...
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.