Captain Cozmos Posted October 18, 2023 Share Posted October 18, 2023 (edited) Rather, I should title this "I am currently disassembling the Subroc Supergame" As this is a work in progress. I will display snippets here and there to show progress but overall I will eventually post the entire thing. The goal is to have a complete disassembly with a make file that will assemble the whole game into a disk or datapack Another goal will be to have enough information and labels that you can at least tell which parts are what. Whether there will be enough info that you can alter the game enough to add or subtract elements remains to be seen. So far I have disassembled the Boot Block and the Title screen. The patterns, Sound Table, NMI, Zero Page routines, loader for the game itself. The loader starts off by loading block 3 to $CC00, passes the CURRENT_DEV (device id) then jumps to $CF37 to display the title screen and animation while simultaneously loading the main portion of the game into memory. This is a small snippet for setting up the TITLE Screen SETUP_TITLE_SCREEN: LD HL, 0 LD BC, 3FFFH XOR A CALL SUB_CFD2 CALL SETUP_VRAM LD HL, 20H LD BC, 5AH LD DE, 100H CALL PUT_ASCII LD HL, TITLE_PATS_02 LD BC, 100H LD DE, 0 CALL SUB_CFB2 LD HL, TITLE_PATS_03 LD BC, 1A8H LD DE, 2D8H CALL SUB_CFB2 LD HL, DRIP_PATTERN LD BC, 20H LD DE, 2B00H CALL SUB_CFB2 LD HL, TITLE_PATS_01 LD DE, 1880H LD BC, 281H CALL SUB_CFB2 RET As I identify and label more a clearer picture will form. Edited October 18, 2023 by Captain Cozmos 1 Quote Link to comment Share on other sites More sharing options...
Captain Cozmos Posted October 18, 2023 Author Share Posted October 18, 2023 (edited) Patterns and Name Table loaded into Tony Cruise's tile editor from direct data. Personally, I like Color in my projects Edited October 18, 2023 by Captain Cozmos Quote Link to comment Share on other sites More sharing options...
Captain Cozmos Posted October 18, 2023 Author Share Posted October 18, 2023 (edited) Lastly for this morning. The routine that actually sets up the main Title Screen before it starts dripping.. DISPLAY_TITLES: LD bc, 704h ; background color to 4 LD ix, WRITE_REGISTER CALL sub_CECC LD bc, 1A2h ; register 1, 16k, interrupt enabled, mode 1, 16x16 sprites (in another thread I called this mode 0, it is mode 1) LD ix, WRITE_REGISTER CALL sub_CECC LD hl, TITLE_PATTERNS LD bc, 480h LD de, 300h CALL LOAD_TO_VRAM LD hl, TITLES_COLOR_TABLE LD bc, 12h LD de, 2B0Ch CALL LOAD_TO_VRAM XOR a LD bc, 300h LD hl, 1800h CALL sub_CFD2 LD hl, NAME_TABLE LD bc, 140h LD de, 1840h CALL LOAD_TO_VRAM LD de, THE_OFFICIAL_TXT LD hl, 1823h CALL sub_D04B LD de, COLECO_1984_TXT LD hl, 1A41h CALL sub_D04B LD de, SEGA_1982_TXT LD hl, 1A61h CALL sub_D04B LD de, SR_AND_SEGA_ARE_TXT LD hl, 1A83h CALL sub_D04B LD de, TRADEMARKS_OF_TXT LD hl, 1AA3h CALL sub_D04B LD de, SEGA_ENTERPRISES_TXT LD hl, 1AC3h CALL sub_D04B LD hl, DRIP_PARTS LD bc, 2C0h LD de, 3800h CALL LOAD_TO_VRAM LD hl, DRIP_ANIMATION_PARTS LD bc, 30h LD de, 0CE48h LDir LD bc, 1E2h LD ix, WRITE_REGISTER CALL sub_CECC Edited October 18, 2023 by Captain Cozmos Quote Link to comment Share on other sites More sharing options...
Captain Cozmos Posted October 18, 2023 Author Share Posted October 18, 2023 (edited) Mulling through the code and now I have a bit more insight on how Super Games work. Originally, I learned from the Mayan super game source on how to load blocks into memory. The example it gives is to: READ1BLOCK do something in between READ1BLOCK do something in between What I found out is that in Subroc, this method is only used once to move the loader program above $8000. Once the routine is in high memory and executing, it can safely bank switch Smart Writer out and load the program anywhere it wants that is not being used. What it also does is: START_RD_1_BLOCK play some music, animation, whatever END_RD_1_BLOCK once the block has been loaded This way it multitasks without the stutter. I suspect with START_RD_1_BLOCK it tells the 6801 to go fetch the data and the Z80 does not wait for it to reply or finish before doing something new. And if you use READ1BLOCK, the system has to wait till it is done reading before moving on. I came across this in Diablo. The examples I have come across in all the fan based books have used READ_KEYBOARD While Diablo uses START_RD_KBD and END_RD_KBD to multitask through the game. As I progress through the disassembly, some or all of this info may change but this is what I have learned thus far. EDIT: On a side note, this game also does not use the OS7 Colecovision BIOS. It sets up all the RST vectors in page 0 then uses the ADAM EOS for everything else. Edited October 18, 2023 by Captain Cozmos Quote Link to comment Share on other sites More sharing options...
Captain Cozmos Posted October 18, 2023 Author Share Posted October 18, 2023 (edited) Corrections already when I should have gone to bed after being up all night. The Boot code I initially said sets up the system was partially correct. First: ADAM internal program loads the first block (1k), starting at 0, to $C800 then executes it. That was my initial BOOT BLOCK. The Boot Block then loads the TITLES program into CC00 then jumps to $CF37 to do setup, run the animation, music and load in the main game. I misread a portion of the code which register's HL $CC00 is the destination in memory register's DE $1 is the starting block on the media register B $3 is a counter. This is strait forward but I was going off the Mayan Source way of the boot block. This BOOT BLOCK loads 4 blocks (4k), starting at block 1 ($400), into $CC00 which is right after the $C800 default ADAM boot area for disks and data packs while $8000 is for cartridges. All of that will be updated in the disassembly when completed. I hope this clears up any confusion. Edited October 18, 2023 by Captain Cozmos Quote Link to comment Share on other sites More sharing options...
Captain Cozmos Posted October 18, 2023 Author Share Posted October 18, 2023 (edited) Games is disassembled. Here is a preliminary Map of what I have deciphered so far: Memory Map of Subroc Super Game Section Size Where in Media Where in Ram when loaded Boot 1k ($000) $C800 Titles Main 2k ($0400-$0FFF) $CC00 Loaded in from Boot Block Titles Data 2k ($1000-$1BF0) $C000 Overwrites Boot Block after Title executes Game Main 36k ($1C00-$ABFF) $2000 Loaded in from Titles Program High Score 1k ($AC00) $B000 Loaded into Ram along with the main program When Game is over (Hall of Fame) High Score 2k ($AC00-AFFF) $1C00 When Game is over. HScore Edit 10K ($14800-$173F0) $9800 Loaded in from Main program when game is over. HS Edit Data 2k ($B800-$BFF0) $C000 I have found that the Hall of Fame design takes over most of the memory once the game is over forcing ADAM to reload most of, if not all of it from the beginning in order to play again. This may change as I do more work. All sections have been disassembled and now the data and pointers to be identified and labelled. I have found a lot of data on both disk and ddp that do not belong to the Sub Roc and may just be what was on the media prior to it's creation. After the whole thing is disassembled and rebuilt we will have the cleanest version since it's creation. 03 Cosmos Edited October 18, 2023 by Captain Cozmos 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.