+Gemintronic Posted February 26, 2013 Share Posted February 26, 2013 I recently came upon a trove of audio cassettes. Got me thinking of making a bB game release on the Supercharger. I've found this utility to transfer games to cassette http://www.romhackin.../utilities/712/ It says 2k-4k games MAY work. What does that mean? Has anyone tried to make a Supercharger game in bB? Can I use superchip memory? UPDATE: Batari made a Supercharger game here: http://www.atariage.com/forums/topic/108859-supercharger-banking-with-bb/#entry1316869 Sounds like 4k games are possible.. Quote Link to comment Share on other sites More sharing options...
alex_79 Posted February 26, 2013 Share Posted February 26, 2013 It says 2k-4k games MAY work. What does that mean? It refers to loading existing 2k and 4k roms: the supercharger has 6k of ram, divided into 3 2k banks and another 2k of rom containig the bios, so there are 4 banks in total. Address $FFF8 is the 'hotspot' used to swap banks. When loading a game originally coded for a non bankswitched 2k or 4k cartridge, there's the risk that the program could access the hotspot, causing an unwanted bankswitch and therefore a crash. So you can do a 2k/4k game which is also compatible with the supercharger by ensuring that the program never accesses the hotspot address. Quote Link to comment Share on other sites More sharing options...
+Gemintronic Posted February 26, 2013 Author Share Posted February 26, 2013 It refers to loading existing 2k and 4k roms: the supercharger has 6k of ram, divided into 3 2k banks and another 2k of rom containig the bios, so there are 4 banks in total. Address $FFF8 is the 'hotspot' used to swap banks. When loading a game originally coded for a non bankswitched 2k or 4k cartridge, there's the risk that the program could access the hotspot, causing an unwanted bankswitch and therefore a crash. So you can do a 2k/4k game which is also compatible with the supercharger by ensuring that the program never accesses the hotspot address. Thank you for the info! It sounds like I may be out of luck. batari BASIC seems to make 4k games where the whole 4k is in one bank. Quote Link to comment Share on other sites More sharing options...
Cybearg Posted February 26, 2013 Share Posted February 26, 2013 Too bad. It would be pretty sweet to know that you can kick back and listen to the horrifying squeal of your game's working code. Quote Link to comment Share on other sites More sharing options...
RevEng Posted February 26, 2013 Share Posted February 26, 2013 Thank you for the info! It sounds like I may be out of luck. batari BASIC seems to make 4k games where the whole 4k is in one bank. The only thing before the hotspots is the bB score font data. In a 4k bB rom the score font ends at $FFEC, so they should run fine with a supercharger. I'm not sure if 2k roms need to be doubled-up to 4k to run with SC or not. In a 2k bB rom the score font ends at $F7FC, so if 2k roms load fine as-is, there will be no hotspot access for 2k bB roms. If 2k roms need to be doubled-up, then there will be unintended hotspot access. Anybody with a supercharger care to share how to go about loading 2k roms? Do they need preparation? Quote Link to comment Share on other sites More sharing options...
Mr SQL Posted February 26, 2013 Share Posted February 26, 2013 Thank you for the info! It sounds like I may be out of luck. batari BASIC seems to make 4k games where the whole 4k is in one bank. Loon that shouldn't matter, it's only if you use the entire 4k; looks like the hotspot is 8 bytes away from the end of memory so make sure you have at least 8 bytes free. I think it would be cool to see more 2600 games released on tape 1 Quote Link to comment Share on other sites More sharing options...
RevEng Posted February 26, 2013 Share Posted February 26, 2013 Loon that shouldn't matter, it's only if you use the entire 4k; looks like the hotspot is 8 bytes away from the end of memory so make sure you have at least 8 bytes free. The bB code can only fill up the area before the score font, which has a fixed position and ends just before the hotspots. (for 4k roms) Even if he uses every byte bB lets him use, it will still work. Quote Link to comment Share on other sites More sharing options...
+Gemintronic Posted February 26, 2013 Author Share Posted February 26, 2013 Loon that shouldn't matter, it's only if you use the entire 4k; looks like the hotspot is 8 bytes away from the end of memory so make sure you have at least 8 bytes free. I think it would be cool to see more 2600 games released on tape Do you have a Supercharger or is that key foreign to you Mr SQL? @RevEng: Thanks for the clarification! It sounds like I may be buying a Starpath Supercharger soon.. Quote Link to comment Share on other sites More sharing options...
+Gemintronic Posted October 7, 2013 Author Share Posted October 7, 2013 Welp, I've converted Stranglehand using these settings in MAKEWAV makewav -ts -d2 -f0 sland.bin I've uploaded it to my PSP for later testing on my Supercharger. It's only 13 seconds so that worries me. Should a 4k game be that short? I guess I'll have to test it out and see. If anyone else has better settings for batari BASIC 4k games and the SuperCharger let me know Quote Link to comment Share on other sites More sharing options...
+Gemintronic Posted November 19, 2013 Author Share Posted November 19, 2013 Kind of a related question here: Can bB allocate the RAM above 4k for more variables? Is it compatible enough with SARA memory that I could use bBs 4kSC option? Quote Link to comment Share on other sites More sharing options...
Mr SQL Posted November 20, 2013 Share Posted November 20, 2013 (edited) Kind of a related question here: Can bB allocate the RAM above 4k for more variables? Is it compatible enough with SARA memory that I could use bBs 4kSC option? Loon, here's a routine that should work to allow you to access an additional 30 variables using supercharger RAM from bB - it's still in the 4K though not above. You could expand it to handle 256 variables if you can give up that much ROM. WRITEPROTECT_DEST_ADRS = $FFF8 RAM = $F000 ;using mytable as destination address writesuperchargervariable ;-- arguments: temp1,temp2 : value to write, target variable (0-29) lda $fff8 ; ---------------------------------- eor #%00000010 ; toggle the write protect notch tax CMP RAM,x; preps the value for the write nop CMP WRITEPROTECT_DEST_ADRS ;----------------------------------- ;write target value to RAM: LDY temp1;#VALUE_TO_STORE LDX temp2; target supercharger variable (0-29) CMP RAM,y ; preps the value for the write nop CMP superchargervars,x; does the write lda $fff8 ; ---------------------------------- eor #%00000010 ; toggle the write protect notch tax CMP RAM,x; preps the value for the write nop CMP WRITEPROTECT_DEST_ADRS ;----------------------------------- rts ;---------------------------- jmp jmparoundvars superchargervars ; can initialise them here: .byte 0,0,3,3,4,1,0,0,3,1 .byte 0,0,3,3,4,1,0,0,3,1 .byte 0,0,3,3,4,1,0,0,3,1 jumparoundvars readsuperchargervariable ;-- arguments: temp1 : target variable to read (0-29), returns value ; -- temp1 returns with the value of the target variable ldy temp1 lda superchargervars,y sta temp1 rts ;----------------- Edited November 21, 2013 by Mr SQL Quote Link to comment Share on other sites More sharing options...
Mr SQL Posted December 1, 2013 Share Posted December 1, 2013 Loon, the SuperCharger memory access routine in my last post had a bug - the hotspot can't be read only updated, so we have to know what it is ahead of time. Here's a routine that will let a 4K bB program access the RAM in the extra RAM/ROM bank for additional variable space: it works because only 1/2 of the address space is bank switched - the first 2K is always present so we don't have to add any custom headers or calculations to bankswitch for RAM access like we would to run code! Here are examples calling the routines in asm or bB to load and set 100 supercharger vars (0-99) in the extra memory bank (you can call them from anywhere in your 4K code space): ; store the number 14 in supercharger variable 0: lda #14 ldx #0 jsr writesuperchargervars ;retrieve supercharver variable 2: lda #2 jsr readsuperchargervars For bB, you would set temp variables to 14 and 0 prior to making the first call and load the temp vars into the a and x registers instead of the hard coded numbers. ; store the number 14 in supercharger variable 0: lda temp1 ;temp1 is #14 ldx temp2 ; temp2 is #0 jsr writesuperchargervars For the 2nd call you would set a temp variable to 2 and load the a register with it instead of the hard coded number, and then after the call load the temp variable with the a register (your return value): ;retrieve supercharver variable 2: jsr writesuperchargervars lda temp1 ; temp1 holds the target variable to retrieve (0-99) jsr readsuperchargervars sta temp1 ; return the value in temp1 These routines go near the top of your code to ensure they live in the first 2K of address space: WRITEPROTECT_DEST_ADRS = $FFF8RAM = $F000 writesuperchargervars;---- args: registers a,x (value to write, target variable number (0-99)) ;---- use 100 bytes of ROM for 100 variables in bank II;---- ;-- turn off write protect switch to bank2; yet we remain in bank 3! ldy #%00011011;write protect off, bank2 cmp RAM,y nop cmp WRITEPROTECT_DEST_ADRS ;-- write value to RAM "ROM" tay cmp RAM,y ; prepare the value for the write nop cmp superchargervars,x ; update Virtual World Pixel ;sta ExtendedPlayfieldSCW,x ;-- turn write protect on switch back to bank1 (we're still in bank 3) ;-- ldy #%00001001 cmp RAM,y nop cmp WRITEPROTECT_DEST_ADRS rts ;--------------------------------------------------------- readsuperchargervars;---- args: accumulator (target variable number (0-99));---- returns variable in accumulator;---- use 100 bytes of ROM as RAM for 100 variables in bank II;---- ;-- keep write protect on, switch to bank2; yet we remain in bank 3! ldy #%00011001;write protect off, bank2 cmp RAM,y nop cmp WRITEPROTECT_DEST_ADRS ;-- write value to RAM "ROM" tay lda superchargervars,y ; update Virtual World Pixel ;-- turn write protect on switch back to bank1 (we're still in bank 3) ;-- ldy #%00001001 cmp RAM,y nop cmp WRITEPROTECT_DEST_ADRS rts ;--------------------------------------------------------------------------------------------------- You can either place the label superchargervars at the start of the 2nd 2K of RAM or hard code it to point to that address; it could be anywhere in the 2nd 2K of RAM but putting it at the top avoids hitting a pagebreak which the SuperCharger can't write through. If it's at the top (or aligned to a page) you should be able to access a full 256 extra variables in supercharger RAM! If bB inserts a label within 4K of contiguous address space denoting the start of the 2nd 2K, that could be used instead of superchargervars. Note: I've assumed the default contiguous SuperCharger banks for a 4K ROM are 3 and 1, not 3 and 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.