Traidna Posted October 25, 2021 Share Posted October 25, 2021 Hi, I'm working a MUMPS interpreter that I am writing in assembly and Ive reached 8k and need to do bank switching. I've been trying to file the tutorial in the Dev Resources post Building a multi-bank ROM image but what I have done is not working so I am sure I'm not getting how it's supposed to work. Are there any other resources I can look at? Thank you 1 Quote Link to comment Share on other sites More sharing options...
+Ksarul Posted October 25, 2021 Share Posted October 25, 2021 You might want to start here to see how it is supposed to work. There is a whole section on bank switching and code to do such on Stuart's page. 1 Quote Link to comment Share on other sites More sharing options...
HOME AUTOMATION Posted October 25, 2021 Share Posted October 25, 2021 @Traidna I think this depends somewhat on what type of cart. you intend to use... How are you assembling, ABSOLUTE, RELATIVE, etc.? The above .PDF, willn't open for me! Quote Link to comment Share on other sites More sharing options...
+Ksarul Posted October 26, 2021 Share Posted October 26, 2021 11 hours ago, HOME AUTOMATION said: @Traidna I think this depends somewhat on what type of cart. you intend to use... How are you assembling, ABSOLUTE, RELATIVE, etc.? The above .PDF, willn't open for me! It is reported as a security risk when I attempt to download it, so there may be an issue with the file. . . Quote Link to comment Share on other sites More sharing options...
+retroclouds Posted October 26, 2021 Share Posted October 26, 2021 Not sure why some are have problems with the PDF. Nothing has changed, it's the same zip file that has been there for 11 years now. It's a zip file with a PDF and a binary file called "deref". I checked both with Microsoft Defender and there's nothing to report. bank-switching tutorial v0.2.pdf deref.exe I'll probably remove the zip file from the Development Resources thread as it's outdated and you can find better examples on some of the TI-99-4a related cartridge projects on Github. 1 Quote Link to comment Share on other sites More sharing options...
+retroclouds Posted October 26, 2021 Share Posted October 26, 2021 19 hours ago, Traidna said: Hi, I'm working a MUMPS interpreter that I am writing in assembly and Ive reached 8k and need to do bank switching. I've been trying to file the tutorial in the Dev Resources post Building a multi-bank ROM image but what I have done is not working so I am sure I'm not getting how it's supposed to work. Are there any other resources I can look at? Thank you Not sure what cartridge device you are using. FinalGROM99 ? If that's the case the bank files that make up the rom must be in non-reversed order. The tutorial targets Jon Guidry boards that require the banks to be in reversed order (that was the only solution possible back then, except maybe for GK Kracker that's unobtainable) Quote Link to comment Share on other sites More sharing options...
+FarmerPotato Posted October 26, 2021 Share Posted October 26, 2021 To summarize how it can be done: First, it’s code that can be in ROM. You assemble it in 8K chunks with AORG >6000 at the top. Every file has the same stuff at the top, a bunch of “trampolines” which are code to flip to a page and branch to a routine in it. If all the banks have all the trampolines, it’s easier to code. You need one shared source file with all the trampoline addresses. @retroclouds document shows a good way to keep track of trampoline addresses. TI had a bunch of directives to link shared libraries at load time, but those aren’t implemented in any loader for the 4A. on the Geneve, with GENASM, trampolines are a piece of cake, it’s just one setting in your Makefile to declare banks, then the linker does the real work. 2 Quote Link to comment Share on other sites More sharing options...
Traidna Posted October 26, 2021 Author Share Posted October 26, 2021 4 hours ago, retroclouds said: Not sure what cartridge device you are using. FinalGROM99 ? If that's the case the bank files that make up the rom must be in non-reversed order. The tutorial targets Jon Guidry boards that require the banks to be in reversed order (that was the only solution possible back then, except maybe for GK Kracker that's unobtainable) I currently have a Flashrom99 and working in Classic99. I think I have figured it out, but the reversed addresses did have me confused, I think I have that sorted. Thank you Quote Link to comment Share on other sites More sharing options...
Traidna Posted October 26, 2021 Author Share Posted October 26, 2021 2 hours ago, FarmerPotato said: To summarize how it can be done: First, it’s code that can be in ROM. You assemble it in 8K chunks with AORG >6000 at the top. Every file has the same stuff at the top, a bunch of “trampolines” which are code to flip to a page and branch to a routine in it. If all the banks have all the trampolines, it’s easier to code. You need one shared source file with all the trampoline addresses. @retroclouds document shows a good way to keep track of trampoline addresses. TI had a bunch of directives to link shared libraries at load time, but those aren’t implemented in any loader for the 4A. on the Geneve, with GENASM, trampolines are a piece of cake, it’s just one setting in your Makefile to declare banks, then the linker does the real work. Yes I am using macro (asw.exe) and P2BIN.EXE linker. I think i have it sorted by compiling each bank independently then append to each other, though that does make it trick to understand addresses across banks. Trampoline code placed in PAD ram and getting the write to >6000 and >6002 to pick the correct bank. 2 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.