RevEng Posted January 12, 2022 Share Posted January 12, 2022 Hi All, I've written up a small doc at 7800.8bitdev.org on the new bankswitch scheme Fred (@batari) and I both devised for Petscii Robots, called "Banksets". (and by "both devised" I mean I asked if something like it could be done, and then Fred went off and did all of the hard work.) The Petscii Robots tile graphics use up more than 36k of rom, and all of that and more needs to be in address space for Maria to draw the game screen. It's not hyperbole to say the game wouldn't have been possible without banksets. I also think banksets will open the doors to other games with a higher level of graphic and code complexity. I still have a lot of ground work to do before opening the doors here... I've implemented banksets in A7800 emulation for the 2x128k rom size (with and without ram) but still need to implement some of the other sizes. 7800basic also needs a major update to support banksets, since intertwining code and graphics areas is at the 7800basic core, and that doesn't need to be done anymore with banksets. All of this will work will come soon, hopefully within the next month or two. Lastly, I need to give thanks to @TailChao, who I reached out to, hoping to see if he had insight into any sharp corners we might have ahead of us. (R+V also uses a halt-based bankswitch scheme) He was more than gracious and shared notes, diagrams, and had a bunch of useful advice. Feel free to use this thread to ask questions that aren't covered at the wiki. I hope to flesh out the details there a bit, as I get input, and have time. 14 2 Quote Link to comment https://forums.atariage.com/topic/329635-bankset-bankswitching/ Share on other sites More sharing options...
+Karl G Posted January 12, 2022 Share Posted January 12, 2022 This is pretty amazing! I'm definitely looking forward to seeing it implemented in 7800basic. 1 hour ago, RevEng said: I also think banksets will open the doors to other games with a higher level of graphic and code complexity. Yep. Lots of possibilities come to mind for this. I know it would make a Penult 7800 port a lot easier, too. Cool stuff! 6 Quote Link to comment https://forums.atariage.com/topic/329635-bankset-bankswitching/#findComment-4982885 Share on other sites More sharing options...
OldStyle Posted January 12, 2022 Share Posted January 12, 2022 These are great contributions and schemes springing from your projects. I'm definitely looking forward to taking a crack at the banksets when its ready! 4 Quote Link to comment https://forums.atariage.com/topic/329635-bankset-bankswitching/#findComment-4982898 Share on other sites More sharing options...
RevEng Posted January 12, 2022 Author Share Posted January 12, 2022 Thanks, guys... glad to see there's some early interest brewing! 4 Quote Link to comment https://forums.atariage.com/topic/329635-bankset-bankswitching/#findComment-4982928 Share on other sites More sharing options...
+mksmith Posted January 12, 2022 Share Posted January 12, 2022 When Mike started talking about how this could work I was blown away but until I saw the first build I just couldn't see how it was possible. I suggested to David when discussing the project that we have the finest minds in 7800 land here at AA and boy I'm not wrong! Thank you gents ? 7 Quote Link to comment https://forums.atariage.com/topic/329635-bankset-bankswitching/#findComment-4982958 Share on other sites More sharing options...
+Muddyfunster Posted January 12, 2022 Share Posted January 12, 2022 I'm very excited to see this About 15 projects that I'd previously pushed back as "too complex to juggle the graphics" have just come back to the front burner 9 Quote Link to comment https://forums.atariage.com/topic/329635-bankset-bankswitching/#findComment-4983078 Share on other sites More sharing options...
+Karl G Posted January 12, 2022 Share Posted January 12, 2022 9 hours ago, mksmith said: I suggested to David when discussing the project that we have the finest minds in 7800 land here at AA and boy I'm not wrong! Indeed... 8 Quote Link to comment https://forums.atariage.com/topic/329635-bankset-bankswitching/#findComment-4983105 Share on other sites More sharing options...
+Muddyfunster Posted January 13, 2022 Share Posted January 13, 2022 @RevEng Mike, I'm guessing this scheme will work on SD solutions like Concerto and Dragonfly with appropriate updates to accommodate the scheme in the firmware? I'm thinking ahead to things like testing on real hardware and digital releases. Quote Link to comment https://forums.atariage.com/topic/329635-bankset-bankswitching/#findComment-4983806 Share on other sites More sharing options...
RevEng Posted January 13, 2022 Author Share Posted January 13, 2022 As far as flash carts, the best answer I have at this time is that some won't be compatible with bankset roms. It sounds like Concerto support may be split, depending on the generation. (I'm not sure if @batari has even had a chance to deeply look at it, as he has a lot of stuff on his plate) My guess is that CC2 won't be able to support it, and no idea about DF. From a theoretical standpoint, bankset support depends on the halt line being available to the flashcart logic (PLD, FPGA, or whatever the case may be) and the cart logic needs to be able to delay bankset-switching for 2 cycles after HALT has gone low. This can be done with a simple PLD, as Fred has done, but you need enough available gates to pull it off. (side note: the bankset scheme would have been viable back in the day) A7800 emulation will support banksets. As part of the roll-out efforts, I'm going to reach out to authors on other emulation platforms (namely js7800 and MiSTer) so they have the info and test roms they need to implement support. I will also publicly release those test roms, and flesh out the bankset doc as any questions come in. This is the unfortunate side-effect of bringing new stuff to the platform, but it's unavoidable unless we allow the scene to stagnate. Gotta break a few eggs to cover new ground with tasty ground-omelettes. 3 2 Quote Link to comment https://forums.atariage.com/topic/329635-bankset-bankswitching/#findComment-4983862 Share on other sites More sharing options...
+batari Posted January 14, 2022 Share Posted January 14, 2022 Correct, the older (2015-2016) Concertos don't have the HALT line connected to anything. In 2016, I am not sure that anyone fully understood HALT's behavior. With TailChao's investigation with a logic analyzer years later, the discovery that HALT's behavior was consistent led to the a separate memory space for Sally and Maria as a key feature of the Souper mapper. Unless there is another way to detect HALT (I'm not sure what that could be), it's unlikely these early Concertos will be able to use Bankset (barring hardware mods, like a jumper wire or something.) When I redid the Concerto in 2020, however, I was aware that the Souper mapper used HALT so I did run the HALT line somewhere, though a hardware upgrade is needed to use it. The upgrade would be available on pre-production and production models, though I expect that on production models, the 1M memory upgrade would include the bankset support as well, though one could just opt to get the bankset upgrade. There would be other improvements included with either upgrade, some you'd see right away and others wouldn't be immediately obvious but would allow for certain new features when the firmware support for them is ready. 6 Quote Link to comment https://forums.atariage.com/topic/329635-bankset-bankswitching/#findComment-4984155 Share on other sites More sharing options...
TailChao Posted February 19, 2022 Share Posted February 19, 2022 Hey, congrats on getting this to work! I'm not too fond of Sally and Maria's requirement to share the current bank - completely separating their view of the cartridge (and by proxy, any requirement for synchronization) was the core requirement for SOUPER and removes a significant amount of headache. But I'm guessing this and most of the other nits I'd like to pick originate from a gate limitation in whatever PLD you two are using. On 1/11/2022 at 8:07 PM, RevEng said: Lastly, I need to give thanks to @TailChao, who I reached out to, hoping to see if he had insight into any sharp corners we might have ahead of us. (R+V also uses a halt-based bankswitch scheme) He was more than gracious and shared notes, diagrams, and had a bunch of useful advice. This has now been dumped in a separate thread → here ← for posterity. Go forth and design weird hardware to keep emulator authors busy. On 1/13/2022 at 11:31 PM, batari said: In 2016, I am not sure that anyone fully understood HALT's behavior. With TailChao's investigation with a logic analyzer years later, the discovery that HALT's behavior was consistent led to the a separate memory space for Sally and Maria as a key feature of the Souper mapper. Unless there is another way to detect HALT (I'm not sure what that could be), it's unlikely these early Concertos will be able to use Bankset (barring hardware mods, like a jumper wire or something.) Not quite, to give credit where it is due most of my own work was based upon this trace by nichtsnutz from 2014. I also never formally introduced my 7800 and logic analyzer - it was all scopes and handwaving. You could detect if Maria has the bus without using HALT from the access patterns (R/W is stuck high and her fetches do look different from Sally's) but this method requires far more gates and isn't likely to be as stable. 5 Quote Link to comment https://forums.atariage.com/topic/329635-bankset-bankswitching/#findComment-5007868 Share on other sites More sharing options...
SainT Posted February 19, 2022 Share Posted February 19, 2022 Cool, if there are any sample programs pass them over and I’ll implement on the 7800GD! ? 1 Quote Link to comment https://forums.atariage.com/topic/329635-bankset-bankswitching/#findComment-5007948 Share on other sites More sharing options...
RevEng Posted February 19, 2022 Author Share Posted February 19, 2022 Will do, in the coming days. I'm going to be putting together a test suite of programs for cart/emulator implementers, since there will be a few different bankset formats. I'd rather do this bit formally, so that other people won't need to deal with revisions. 5 Quote Link to comment https://forums.atariage.com/topic/329635-bankset-bankswitching/#findComment-5008008 Share on other sites More sharing options...
RevEng Posted March 21, 2022 Author Share Posted March 21, 2022 Ok, a bit longer than promised, due to the required header changes, but I've released the "Bankset Test Suite" rom pack. You can find it at the bottom of the Bankset Bankswitching wiki page. The a7800 master at github contains full Bankset support. I'm not quite ready for a release of a7800 just yet though - it may be another week or two - as we have testing to do, and incorporation of pokey@800 as a feature for non-bankset schemes. If any emulator or flash cart dev has questions, feel free to reach out! 6 Quote Link to comment https://forums.atariage.com/topic/329635-bankset-bankswitching/#findComment-5025765 Share on other sites More sharing options...
Defender_2600 Posted November 7, 2022 Share Posted November 7, 2022 On 1/12/2022 at 2:07 AM, RevEng said: The Petscii Robots tile graphics use up more than 36k of rom, and all of that and more needs to be in address space for Maria to draw the game screen. It's not hyperbole to say the game wouldn't have been possible without banksets. I also think banksets will open the doors to other games with a higher level of graphic and code complexity. The Petscii Robots tile engine is so amazing... and in full 160B mode!! Speaking of high graphical complexity, still looking at the Petscii Robots tile engine, I was fantasizing about some playing fields in full 160B mode, using a single 13 color palette (just to make things easier) and reserving the second palette for sprites (or other tiles). So here's a "quick" SNES Zelda mock-up, 128 * 192 playing field, 4 * 8 tiles (but it could also be done with 4 * 16 tiles)... just an example to tickle the developers' fancy about 7800 graphics capabilities and Bankset Bankswitching. 7 Quote Link to comment https://forums.atariage.com/topic/329635-bankset-bankswitching/#findComment-5151716 Share on other sites More sharing options...
Eagle Posted November 7, 2022 Share Posted November 7, 2022 4 minutes ago, Defender_2600 said: just an example to tickle the developers' fancy about 7800 graphics capabilities ...please stop 1 10 Quote Link to comment https://forums.atariage.com/topic/329635-bankset-bankswitching/#findComment-5151722 Share on other sites More sharing options...
+wavemotion Posted November 7, 2022 Share Posted November 7, 2022 I'm almost finished implementing banksets for A7800DS (thanks to @RevEng for the consult and the bankset rom pack for testing!). A very slick mechanism if you ask me - really neat to see how much graphics you can push through this scheme. The only thing I don't yet have working is 48/52K flat bankset + Pokey@4000 as I don't support the write-thru. I'm looking into supporting that - but I wonder how popular that target will be especially given support for Pokey@800. 5 Quote Link to comment https://forums.atariage.com/topic/329635-bankset-bankswitching/#findComment-5151760 Share on other sites More sharing options...
+Muddyfunster Posted November 7, 2022 Share Posted November 7, 2022 Looking forward to this hitting 7800Basic 6 Quote Link to comment https://forums.atariage.com/topic/329635-bankset-bankswitching/#findComment-5151783 Share on other sites More sharing options...
RevEng Posted November 7, 2022 Author Share Posted November 7, 2022 3 minutes ago, Muddyfunster said: Looking forward to this hitting 7800Basic It's sorta kinda implemented already - if a bankset format is selected, then the graphics are going to Maria's part of the rom. But Maria needs to see any character strings and tile maps in her rom, not Sally's, so I'm working on making that bit as transparent as possible. It's a bit tricky, because your Mariaa code still needs to reference the location of the graphics stuff in Maria's rom, but neither bank is actually assembled yet. It's not an intractable problem. It just means I'll need to do a lot of extra dancing to keep dasm happy. 45 minutes ago, llabnip said: I'm almost finished implementing banksets for A7800DS (thanks to @RevEng for the consult and the bankset rom pack for testing!). A very slick mechanism if you ask me - really neat to see how much graphics you can push through this scheme. The only thing I don't yet have working is 48/52K flat bankset + Pokey@4000 as I don't support the write-thru. I'm looking into supporting that - but I wonder how popular that target will be especially given support for Pokey@800. So hard to say. My gut feel is the bigger sized banked formats will be the most popular. But I'm used to being constrained by 32K and 48K shared, and it could well be that a lot of designs don't need to be shoehorned into banks anymore with Sally and Maria getting their own rom. 1 hour ago, Defender_2600 said: [...] here's a "quick" SNES Zelda mock-up, 128 * 192 playing field, 4 * 8 tiles (but it could also be done with 4 * 16 tiles)... just an example to tickle the developers' fancy about 7800 graphics capabilities and Bankset Bankswitching. Very cool!!! 3 1 Quote Link to comment https://forums.atariage.com/topic/329635-bankset-bankswitching/#findComment-5151815 Share on other sites More sharing options...
+wavemotion Posted November 7, 2022 Share Posted November 7, 2022 (edited) 1 hour ago, RevEng said: So hard to say. My gut feel is the bigger sized banked formats will be the most popular. But I'm used to being constrained by 32K and 48K shared, and it could well be that a lot of designs don't need to be shoehorned into banks anymore with Sally and Maria getting their own rom. Understood. And to be clear - I support Bankset 32K with Pokey anywhere and 48K and 52K with Pokey anywhere but 4000. I'm working on that last combo where the Pokey overlaps ROM memory. Edit: Although the standard doesn't call out anything > 2x128k, I'm also supporting 2x256 and 2x512 all with or without the RAMx2. You know... just in case someone wants to port Elder Scrolls. Edit2: Figured out how to handle the write-only Pokey@4000 when ROM is also present. With that I now pass all current Bankset test roms! I'd like a certificate. Or at least a gold star. Or just a thumbs up Edited November 7, 2022 by llabnip 8 Quote Link to comment https://forums.atariage.com/topic/329635-bankset-bankswitching/#findComment-5151822 Share on other sites More sharing options...
RevEng Posted November 8, 2022 Author Share Posted November 8, 2022 3 hours ago, llabnip said: Edit2: Figured out how to handle the write-only Pokey@4000 when ROM is also present. With that I now pass all current Bankset test roms! I'd like a certificate. Or at least a gold star. Or just a thumbs up 1 6 Quote Link to comment https://forums.atariage.com/topic/329635-bankset-bankswitching/#findComment-5151974 Share on other sites More sharing options...
SainT Posted February 7, 2023 Share Posted February 7, 2023 (edited) Has the 52KB direct ROM format been test on real hardware @RevEng? I see it working in a7800 fine. I've implemented banksets on the 7800GD and all other schemes work, but the 52KB one does not. It appears to be accessing ROM correctly in the $3-4000 range but crashes within a few frames somewhere. I see the text at the top of the screen flash up, then the screen turns an orange-ish colour. Edited February 7, 2023 by SainT Quote Link to comment https://forums.atariage.com/topic/329635-bankset-bankswitching/#findComment-5204123 Share on other sites More sharing options...
RevEng Posted February 7, 2023 Author Share Posted February 7, 2023 29 minutes ago, SainT said: Has the 52KB direct ROM format been test on real hardware @RevEng? I see it working in a7800 fine. Truth be told, no. Since it was more or less a simple extension of the 48k, we haven't set it up in hardware. It's entirely possible there's some unexpected bios issue, but I don't have time to dig into it at the moment. For now it may be better to just flag it as unsupported. I'll reply back to your message here when I've had a chance to investigate. 1 1 Quote Link to comment https://forums.atariage.com/topic/329635-bankset-bankswitching/#findComment-5204133 Share on other sites More sharing options...
SainT Posted February 7, 2023 Share Posted February 7, 2023 2 minutes ago, RevEng said: Truth be told, no. Since it was more or less a simple extension of the 48k, we haven't set it up in hardware. It's entirely possible there's some unexpected bios issue, but I don't have time to dig into it at the moment. For now it may be better to just flag it as unsupported. I'll reply back to your message here when I've had a chance to investigate. Ok, cool, I'll do some digging my side as well out of curiosity! As the HSC uses the 3xxx region, you'd think it would be usable, but I guess there could be some holes within that region. As I don't enable any mappers until past the BIOS boot, I don't have issues with the BIOS interfering, so this would have to be some kind of memory address decoding issue. 1 Quote Link to comment https://forums.atariage.com/topic/329635-bankset-bankswitching/#findComment-5204135 Share on other sites More sharing options...
SainT Posted February 7, 2023 Share Posted February 7, 2023 I've tracked it down, it was a problem my side with the per-frame break code. It wasn't happy with code in the $3xxx region, fixed and confirmed working on real hardware. That's all bankset mappers working fully now on the 7800GD. 9 Quote Link to comment https://forums.atariage.com/topic/329635-bankset-bankswitching/#findComment-5204192 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.