+bhall408 Posted March 29, 2019 Share Posted March 29, 2019 Has anyone ever tried/already split out combo game carts into individual games/LNX files? For example, taking the combo Super Asteroids/Missile Command, splitting into two files, and patching each such that only one game is visible/accessible from each of the two LNX files. If not, I'll probably take a try at it myself. 1 Quote Link to comment Share on other sites More sharing options...
Nop90 Posted March 29, 2019 Share Posted March 29, 2019 Don't know if it's possible to split the two games, because it's probable that the two shares some functons (sound driver , gfx effect, input handling) to save cart memory. What you could do is to make two copies of the rom and hack each one to make them load automatically on start only one of the two games. Than if you want to go further, you could clean from each rom cart the unused part and then hack the cart directory to remove the not needed sectors and shrink the rome to reduce it's size. But I don't think it's worth the effort. Quote Link to comment Share on other sites More sharing options...
sage Posted March 29, 2019 Share Posted March 29, 2019 (edited) Don't know if it's possible to split the two games, because it's probable that the two shares some functons (sound driver , gfx effect, input handling) to save cart memory. What you could do is to make two copies of the rom and hack each one to make them load automatically on start only one of the two games. Than if you want to go further, you could clean from each rom cart the unused part and then hack the cart directory to remove the not needed sectors and shrink the rome to reduce it's size. But I don't think it's worth the effort. no problem. see my battlezone patch which loads the easter egg game automatically. Edited March 29, 2019 by sage 1 Quote Link to comment Share on other sites More sharing options...
+bhall408 Posted March 29, 2019 Author Share Posted March 29, 2019 Don't know if it's possible to split the two games, because it's probable that the two shares some functons (sound driver , gfx effect, input handling) to save cart memory. What you could do is to make two copies of the rom and hack each one to make them load automatically on start only one of the two games. Than if you want to go further, you could clean from each rom cart the unused part and then hack the cart directory to remove the not needed sectors and shrink the rome to reduce it's size. I'm not concerned about the size. Just the UX. The goal would be that each file loads and displays one (and only one) of the games. It is fine if that is just by patching the code, and not pruning out the unused assets. Have to cover all the cases where they would both appear and patch around that. That there is a *3rd* option to have a "separate" game that is the bonus, might also be a great idea! (Kudos to Sage!) Quote Link to comment Share on other sites More sharing options...
Nop90 Posted March 29, 2019 Share Posted March 29, 2019 The goal would be that each file loads and displays one (and only one) of the games. It is fine if that is just by patching the code, Seems it's not so easy: the addresses where the two games entry points are stored are verified just after the splash screen, and if changed the game halts. The same for the memory range of the function that loads one of the two values in memory before triggering an indirect jump. Obviously the part of code that performs the check is encrypted. I'm not saying it's impossible to hack the rom, but It's not the simple task I hoped. Quote Link to comment Share on other sites More sharing options...
+karri Posted March 29, 2019 Share Posted March 29, 2019 (edited) In case you want to give it a try so I just decrypted the bootloader. It comes in two parts. The disassembled source is here. block1.txt block2.txt Edited March 29, 2019 by karri Quote Link to comment Share on other sites More sharing options...
Nop90 Posted March 30, 2019 Share Posted March 30, 2019 Thanks, interesting part to study, Following the bootloder code with the debugger it seesm calculatesome sort of hash of the whole rom. Isn't it? BTW I'll understand better it from your files. Quote Link to comment Share on other sites More sharing options...
sage Posted March 30, 2019 Share Posted March 30, 2019 (edited) Seems it's not so easy: the addresses where the two games entry points are stored are verified just after the splash screen, and if changed the game halts. The same for the memory range of the function that loads one of the two values in memory before triggering an indirect jump. Obviously the part of code that performs the check is encrypted. I'm not saying it's impossible to hack the rom, but It's not the simple task I hoped. just overwrite it with another loader. i am sure this was discussed here already. Edited March 30, 2019 by sage Quote Link to comment Share on other sites More sharing options...
sage Posted March 30, 2019 Share Posted March 30, 2019 -> check my website, all you need for this is there Quote Link to comment Share on other sites More sharing options...
Nop90 Posted March 30, 2019 Share Posted March 30, 2019 -> check my website, all you need for this is there Yes I konow, but I'm trying to understand everything step by step. Now I have clear how works the two loaders, alreay was able to replace the first. For the second I have to understand better the cart structure. If I would change only part of the loader, can't find how to re-encode a chink of code (52 bytes if I'm not wrong). Quote Link to comment Share on other sites More sharing options...
sage Posted March 30, 2019 Share Posted March 30, 2019 as you wish. all i want to menation is that all that has been done long time ago. it is quite easy. you just have to switch the title pic and first binary address from tghe hardcoded one in the loader to the one which is read from the directory. if you want to do it again, go ahead. :shrug: Quote Link to comment Share on other sites More sharing options...
+karri Posted March 30, 2019 Share Posted March 30, 2019 I did write a code using OpenSSL for encoding and decoding the header. It is not so tidy. But it works. pk.zip Quote Link to comment Share on other sites More sharing options...
Nop90 Posted March 30, 2019 Share Posted March 30, 2019 Thanks to the hints of Sage and karri now I understand the two loaders and the encryption, so I'm able to decrypt / encrrypt the two loaders. For the OP, I have a basic patch to show only one of the two games (that requires more work to have a perfect result). Assuming there is only one type of rom around, here is what you need to do. First the second loader needs to be patched to remove the checksum control changing the hillighted values: in the red ones: than it's possible to change one of the game entrypoint to the value of the other, so that always the same game is loaded: AD 26 is for Missile Command and 85 27 for super Asteroids. What is missing from this patch: 1) the splashscren is unchanged and shows both the titles, it's possible to skip the splashscreen or change the image with another. 2) in the main title pressing left/right still try to change the title, but it loads always the same. This makes restarting the intro. The check for left/right directions should be disabled (yesterday night found the point where to patch it but can't remember it today and don't have time now to trace again te code) 3) the starting intro music is always that of missile command, but left/right changes it (that's a nice feature IMHO). Disabling the left/right check the Asteroids version will require to change the music to load on start. All this things are not difficult, but time consuming, so I think I'll stop here. 1 Quote Link to comment Share on other sites More sharing options...
+karri Posted March 30, 2019 Share Posted March 30, 2019 The value of data grows as it is shared. We seem to have one new specialist who fully understands what makes the Lynx tick Quote Link to comment Share on other sites More sharing options...
sage Posted March 30, 2019 Share Posted March 30, 2019 congrats Quote Link to comment Share on other sites More sharing options...
+bhall408 Posted April 6, 2019 Author Share Posted April 6, 2019 Thanks everyone for running with this puzzler! nop90 is right about the additional things you'd want for each of the resulting 2 files to be nice and self-contained (and make sense as stand-alone) I'll come back to it later on... 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.