Marius Posted October 1, 2015 Share Posted October 1, 2015 (edited) Hi all, BEWARE: Only use this when you know what you are doing or what this is! I'm not responsible for any caused issues. Preface When you are a user of MyIDE ][ and you use the FAT32 loader that came with the cart, you've probably noticed that although it runs a lot of titles, there are .XEX files that do not want to run with it. From most games (.XEX) there do exist several versions, so most of the time you'll find an alternative that runs. But sometimes not... and that is a pity, since you want your MyIDE 2 cartridge to be as compatible as possible. The first thing you should do is check whether you have the newest version of Steven Tuckers FAT32 loader (it is version v20130224). When you have that version read on... if not, first update your MyIDE ][ cart. I did not test my patch with previous versions of the MyIDE ][ FAT32 loader. What is this patch? This patch is a custom loader-routine, that has to be added to every non-working XEX file. The FAT32 tool made by Steven Tucker loads all data from your game into the SRAM of the MyIDE ][ cart, and when ALL data is in SRAM, the FAT32 loader starts to process the data, during that it copies all data into the right RAM area of your atari 8bit computer. Unfortunately there are some cases where this goes wrong, and you can't play your desired game. This is where my routine might be handy! You have to patch every non working XEX game with my patch (read on to find out how). My patch has to be placed on TOP of the binary file (the XEX type game), so when the FAT32 loader loads the patched game, it will load and start the custom loader as the first thing. As soon as the FAT32 loader has transferred ALL data to the SRAM, my custom loader-routine will start, and then for the rest of the loading process the FAT32 loader is bypassed. The result is (hopefully) that the game that previously did not want to run, now runs! How to patch your non working game! Let me repeat: ONLY try this with XEX or COM files. It is not for BAS or ATR or R16 or ROM files (!) There are several ways to do it. 1. Use a hex editor 2. Use a copy command in MSDOWS environment It probably can be done in Linux/Mac OS X, but I did not investigate that. 1. The Hexeditor First load the M2PATCH.OBJ, then load the XEX file that you want to patch. Select ALL data from the M2PATCH.OBJ that is $150 bytes long Copy this data Then move to the screen with the XEX file you want to patch and PASTE all the data from the previous operation into this XEX file. Make sure you have INSERT-data and not OVERWRITE-data (!) Save your patched game. My advice: save it to a new filename, so you keep your original file. Your patched game is the file you will use from now on on your MyIDE ][ CF card. 2. MSDOS prompt Make sure you have the M2PATCH.OBJ and the XEX file you want to patch in the same directory. then type this: COPY /b M2PATCH.OBJ + GAMETOPATCH.XEX NEWFILENAME.XEX Don't miss the PLUS (+) This will glue the M2PATCH.OBJ to the game you want to patch. (Make sure you type THAT file first!) Well that's it... This is an ugly way of doing it, but I have not the skills at this moment to write a pretty patcher. Best would be a patched FAT32 loader, so you don't have to patch all the non-working games. But my philosophy: better something, than nothing. If you need help, or if you have other questions, feel free to ask. Marius p.s. for the people who do not read everything: yes, you have to patch ALL the non-working XEX games with this routine. The routine itself doesn't do a thing for you, you have to follow the instructions. Edited October 1, 2015 by ProWizard 3 Quote Link to comment Share on other sites More sharing options...
Marius Posted October 1, 2015 Author Share Posted October 1, 2015 Oh I almost forget one thing... If you patch an XEX that has NOT a RUN address specified inside the binary, this will most certainly NOT work. So if you run into that, let me know. Do not use this patch on games that already do work. 1 Quote Link to comment Share on other sites More sharing options...
erichenneke Posted October 2, 2015 Share Posted October 2, 2015 ProWizard!! Great to see this coming along! I tried it with a compiled Turbo Basic XL program that had been subsequently linked to the TBXL runtime using linker. The executable then also has two binary files appended to it from which data is loaded into memory before the program portion runs. It does not load properly on MyIde II FAT32 loader. So I tried your patch, but it still doesn't load properly on MyIde II FAT32 loader. Here I am attaching simple example files with the exact same situation i described about ( Compiled TBXL, Linked to runtime, then appended with two binary files that load data into memory). TWOBIN.XEX is withOUT your patch. TWOBINP.XEX is WITH your patch. I also included the TBLINKER since you said you were unable to find that. Hopefully form this you can see what is going wrong and perhaps your patcher can be tweaked to address it ? -Eric TWOBIN.rar Quote Link to comment Share on other sites More sharing options...
Marius Posted October 2, 2015 Author Share Posted October 2, 2015 ProWizard!! Great to see this coming along! I tried it with a compiled Turbo Basic XL program that had been subsequently linked to the TBXL runtime using linker. The executable then also has two binary files appended to it from which data is loaded into memory before the program portion runs. It does not load properly on MyIde II FAT32 loader. So I tried your patch, but it still doesn't load properly on MyIde II FAT32 loader. Here I am attaching simple example files with the exact same situation i described about ( Compiled TBXL, Linked to runtime, then appended with two binary files that load data into memory). TWOBIN.XEX is withOUT your patch. TWOBINP.XEX is WITH your patch. I also included the TBLINKER since you said you were unable to find that. Hopefully form this you can see what is going wrong and perhaps your patcher can be tweaked to address it ? -Eric Hi! Tested your file also from the SIDE loader but it also fails there. The first thing I notice is that your binary file does not end with a run command (you can recognize those by a byte sequence like E0 02 E1 02 LSB MSB (where LSB/MSB is the RUN address) or a INIT byte sequence like E2 02 E3 02 LSB MSB. There are two data blocks appended to the end of your files, which is one of the reasons my loader will not work. My loader expects at the end of a binary file a RUN command. Something I have to investigate is what happens on real atari with data that comes AFTER a RUN command. Did you try other binaries too? This binary seems to be a little bit exotic to me, so I am wondering whether you tried other binaries too. Quote Link to comment Share on other sites More sharing options...
Marius Posted October 2, 2015 Author Share Posted October 2, 2015 I'm close to a fix. 1) The binary actually runs, but there is no screen output (you can hear this by using the keyboard, you'll hear the keyclicks) 2) There is a shortcoming in my routine that I can't fix that 1-2-3 since it's not possible to detect in SRAM what size the original binary was. So any run address IN the Binary file has to be at the very end of the binary (So I moved the 6 byte block E002E1029506) to the end now... When I do that your file runs (except for problem 1). When you do step 2 with a HEX editor (search for E002E1029506 in the Patched file, cut that and paste it at the very end of the file) and you run the binary and you press R it runs. I'll see what I can do.... Quote Link to comment Share on other sites More sharing options...
Marius Posted October 2, 2015 Author Share Posted October 2, 2015 ProWizard!! Great to see this coming along! I tried it with a compiled Turbo Basic XL program that had been subsequently linked to the TBXL runtime using linker. The executable then also has two binary files appended to it from which data is loaded into memory before the program portion runs. It does not load properly on MyIde II FAT32 loader. So I tried your patch, but it still doesn't load properly on MyIde II FAT32 loader. Here I am attaching simple example files with the exact same situation i described about ( Compiled TBXL, Linked to runtime, then appended with two binary files that load data into memory). TWOBIN.XEX is withOUT your patch. TWOBINP.XEX is WITH your patch. I also included the TBLINKER since you said you were unable to find that. Hopefully form this you can see what is going wrong and perhaps your patcher can be tweaked to address it ? -Eric Ok here is my new fix. It's a bit more complicated to fix. 1) Apply the fix in the ZIP in the same way as described before 2) Open hex editor and search for this string: E002E1029506 3) Select that string, cut it, and paste it to the END of the file. 4) Save new file (extention must be .XEX) ... should work. Any other XEX that does not run with my patch... search for the string E002E102 cut those 4 + 2 extra bytes out and paste them at the very end of the patched file. I know... at this stage it is a bit complicated. I really need to learn to code on PC/MAC so I can write a more intelligent patcher. If you need help, feel free to ask. Greetz M. Quote Link to comment Share on other sites More sharing options...
Roydea6 Posted October 2, 2015 Share Posted October 2, 2015 oKay I have opened and play about 40 of my game xex's and can't find any yet that I can test this patch on... Can you give me an example game.xex that doesn't work with MyIDE II and fat32loader. 1 Quote Link to comment Share on other sites More sharing options...
Marius Posted October 2, 2015 Author Share Posted October 2, 2015 I will post a few of these games soon. I have a handful games that do not work ( trainer version of wloczykij, zybex file version with the right sound) are two games I remember that do not work properly. TBXL compiled XEX files do not work. Quote Link to comment Share on other sites More sharing options...
Marius Posted October 2, 2015 Author Share Posted October 2, 2015 Here you go: Drop It - works with patch Flowers Mania - works with patch Swapz - works with patch The Extirpator - works with patch Zybex - works with patch Digi Duck - works with patch Goldhunter - works with patch Jet Set Willy 2007 - works with patch Pyramid - works with patch (it refused to load further) Wloczykij - works with patch International Karate - works with patch World Championship Karate (same game?) - works with patch Zybex - works with patch* *) there are Zybex versions that already did run, but they have a sound bug. (Strange noise, well at least on my PAL atari's). I realize btw. that there is still something to fix in my code. When in binary file INIT AND RUN address are set in the same block (E0 02 E3 02 xx xx xx xx) my routine does skip the RUN address... (fixed that in these examples manually). 1 Quote Link to comment Share on other sites More sharing options...
darwinmac Posted October 2, 2015 Share Posted October 2, 2015 ProWizard, Thanks for the patch. I tried it on my XEX of Isora and it now works using the MyIDE-II FAT-32 loader. Before, I had to run the game using the SIDE FAT-32 launcher that was modified for MyIDE-II. However, the patch did not work on the Tempest Xtreem demo that Atlantis Games Group put out a few years ago. To run that demo, I still need to run the SIDE loader. In my humble collection, those are the only two XEX files that I have that did not work with the FAT-32 loader. Bob C Quote Link to comment Share on other sites More sharing options...
erichenneke Posted October 3, 2015 Share Posted October 3, 2015 Ok here is my new fix. It's a bit more complicated to fix. 1) Apply the fix in the ZIP in the same way as described before 2) Open hex editor and search for this string: E002E1029506 3) Select that string, cut it, and paste it to the END of the file. 4) Save new file (extention must be .XEX) ... should work. Any other XEX that does not run with my patch... search for the string E002E102 cut those 4 + 2 extra bytes out and paste them at the very end of the patched file. I know... at this stage it is a bit complicated. I really need to learn to code on PC/MAC so I can write a more intelligent patcher. If you need help, feel free to ask. Greetz M. You correct! if i edit the binary file with hex editor and move the E002E102 to the end it works correctly on the FAT32 loader. So, seems i also need to understand why the files i am creating don't have the run instruction at the end in the first place! Quote Link to comment Share on other sites More sharing options...
Marius Posted October 3, 2015 Author Share Posted October 3, 2015 You correct! if i edit the binary file with hex editor and move the E002E102 to the end it works correctly on the FAT32 loader. So, seems i also need to understand why the files i am creating don't have the run instruction at the end in the first place! That's not anyones fault. It should be supported by my tool since dos reads a binary till an init segment. It ignores the run command till an end of file is reached. Since my loader does not load the file like DOS I couldn't work with end of file.... So my routine executes a run as soon as it sees a run segment in the binary. That works in a lot of casessince most of files do have run segment at the very end. But thanks to your contribution I now know that not all files have that, so I am thinking of a more user friendly solution. Good to hear it works though. If you use tbxl a lot I could try to adapt the linker so it would always create a file that loads on myide 2. Quote Link to comment Share on other sites More sharing options...
Marius Posted October 3, 2015 Author Share Posted October 3, 2015 ProWizard, Thanks for the patch. I tried it on my XEX of Isora and it now works using the MyIDE-II FAT-32 loader. Before, I had to run the game using the SIDE FAT-32 launcher that was modified for MyIDE-II. However, the patch did not work on the Tempest Xtreem demo that Atlantis Games Group put out a few years ago. To run that demo, I still need to run the SIDE loader. In my humble collection, those are the only two XEX files that I have that did not work with the FAT-32 loader. Bob C Great to read you were able to patch a file! I'm not entirely satisfied myself so I'll investigate that other game and try to improve my routine. Thanks for your feedback. It's highly appreciated! Quote Link to comment Share on other sites More sharing options...
Marius Posted October 3, 2015 Author Share Posted October 3, 2015 I have some ideas of further improvement... I'm printing my source now, and then I'm going to do some improvements... It's a great project to work on. Let's hope I have to post something soon again. Quote Link to comment Share on other sites More sharing options...
erichenneke Posted October 3, 2015 Share Posted October 3, 2015 That's not anyones fault. It should be supported by my tool since dos reads a binary till an init segment. It ignores the run command till an end of file is reached. Since my loader does not load the file like DOS I couldn't work with end of file.... So my routine executes a run as soon as it sees a run segment in the binary. That works in a lot of casessince most of files do have run segment at the very end. But thanks to your contribution I now know that not all files have that, so I am thinking of a more user friendly solution. Good to hear it works though. If you use tbxl a lot I could try to adapt the linker so it would always create a file that loads on myide 2. that would be cool! By the way, i noticed that the patched files work on the MyIDE II but then they don't load from DOS directly any longer. Is that just going to be an inherent problem in the solution? Quote Link to comment Share on other sites More sharing options...
Marius Posted October 3, 2015 Author Share Posted October 3, 2015 that would be cool! By the way, i noticed that the patched files work on the MyIDE II but then they don't load from DOS directly any longer. Is that just going to be an inherent problem in the solution? It is a patch for MyIDE 2. I wouldn't call that a problem, but a thing to take in mind. Patched files are MyIDE 2 ONLY. I could -if you are interested- create also a solution where you have to use the MyBIOS Image mode. Then you can use your unmodified files (so you don't have to patch the files individually), but I guess that is less convenient than using the FAT32 loader. The reason they can't load anymore is because the patch expects the entire binary to be in the SRAM of the MyIDE 2 cart. That is what the FAT32 loader does. So when you load them (the patched files) from DOS, that will fail, because there is nothing in SRAM. Quote Link to comment Share on other sites More sharing options...
erichenneke Posted October 4, 2015 Share Posted October 4, 2015 It is a patch for MyIDE 2. I wouldn't call that a problem, but a thing to take in mind. Patched files are MyIDE 2 ONLY. I could -if you are interested- create also a solution where you have to use the MyBIOS Image mode. Then you can use your unmodified files (so you don't have to patch the files individually), but I guess that is less convenient than using the FAT32 loader. The reason they can't load anymore is because the patch expects the entire binary to be in the SRAM of the MyIDE 2 cart. That is what the FAT32 loader does. So when you load them (the patched files) from DOS, that will fail, because there is nothing in SRAM. thanks for explaining. It was more of a curiosity than anything. Great that it is working on the FAT32 loader! That was what I really wanted. Quote Link to comment Share on other sites More sharing options...
Marius Posted October 4, 2015 Author Share Posted October 4, 2015 ProWizard, Thanks for the patch. I tried it on my XEX of Isora and it now works using the MyIDE-II FAT-32 loader. Before, I had to run the game using the SIDE FAT-32 launcher that was modified for MyIDE-II. However, the patch did not work on the Tempest Xtreem demo that Atlantis Games Group put out a few years ago. To run that demo, I still need to run the SIDE loader. In my humble collection, those are the only two XEX files that I have that did not work with the FAT-32 loader. Bob C Lol I want to thank you for giving me a headache lol... have been busy for two days. Rearranged a lot of the patch routine. It's improved a lot, but... Tempest Xtreem still does not run completely (I have the intro screen running, but with flaws). So I consulted my good friend FlashJazzCat through WhatsApp messenger, and I hope he can give me some advice... Stay tuned! Greetz M. Quote Link to comment Share on other sites More sharing options...
Marius Posted October 5, 2015 Author Share Posted October 5, 2015 Last night FJC did point me in the right direction, which improved the routine again. He is really a genius! Next to that I also found a small bug in the heart of my code, which could lead to a non-working game. This is fixed too now. When I'm back home again, I will post the third release of the patch. This time you'll have to add the patch as always on top of the binary you want to patch, and you'll also have to add a small block to the END of the binary. Beware: when you start patching, use -again- the original non-working XEX. Do not use previously patched files. The good news is: you don't have to move around RUN or INIT addresses anymore. That's fixed too! Tempest Extreem Demo will also run with the new patch. As soon as this third patch seems to run very well indeed, I'll optimize the code, and I'll try to make a tool that does the merging for you. Greetz M. p.s. as written: the file follows later... 1 Quote Link to comment Share on other sites More sharing options...
flashjazzcat Posted October 6, 2015 Share Posted October 6, 2015 The Tempest Extreme demo appears to depend on RAM being empty where the graphics 0 display list would normally be (after BASIC is disabled and the editor reopened), otherwise it crashes in pile-up of self pre-empting display list interrupts. Vblank eventually deasserts DLI bit but by then the stack is wiped out. Quote Link to comment Share on other sites More sharing options...
Marius Posted October 6, 2015 Author Share Posted October 6, 2015 The Tempest Extreme demo appears to depend on RAM being empty where the graphics 0 display list would normally be (after BASIC is disabled and the editor reopened), otherwise it crashes in pile-up of self pre-empting display list interrupts. Vblank eventually deasserts DLI bit but by then the stack is wiped out. My conclusion was so far that I would have to write two patches. One that opens the E: and one that does not. I found that a game like DIGI DUCK has a txt screen when loaded (with a message from Mr. Bacardi when I remember correct). When I do not open the E: when loading binary files, those messages are not shown. I think I'll make it this way: My patch will open E: unless SHIFT is holded. Then people could use ONE patch for all the not-working games. For Tempest Extreem then it would be needed to hold shift when loading and perhaps for other games. My conclusion is that this is a BUG or at least a flaw in Tempest Extreem. Quote Link to comment Share on other sites More sharing options...
Marius Posted October 6, 2015 Author Share Posted October 6, 2015 (edited) Okay new files. Things might look more complicated, but I think they are not that complicate. In the zip file you'll find two files: M2PATCHv3-withE.obj M2PATCHv3-endblock.obj 1) take the original non working)game 2) place M2PATCHv3-withE.obj on top of the non working game (use : COPY /b M2PATCHv3-withE.obj + GAMETOPATCH.XEX TEMPFILENAME.XEX) 3) place M2PATCHv3-endblock.obj at the end of tempfilename.xex (use: COPY /b tempfilename.xex + M2PATCHv3-endblock.obj newfilename.xex) You could also use a HEXEDITOR of course. This loader works with the "E:" device opened. So TBXL files (like the one from Eric) should work with this patch. Tempest Extreem Demo is buggy and does not accept "E:" to be opened. So you could edit M2PATCHv3-withE.obj with a hexeditor. Search for the string: 01E2 change this into: 00E2 Tempest Extreem Demo is also added, so you do not have to do this. I'll patch the previous patched games again with this new patch. It's much better now. I'll also patch some games that did not want to be patched with the older versions. Have fun! This time you don't have to mess around with INIT and RUN addresses. It seems to be ALL supported now. M. p.s. feel free to ask help! Edited October 6, 2015 by ProWizard 1 Quote Link to comment Share on other sites More sharing options...
Marius Posted October 6, 2015 Author Share Posted October 6, 2015 (edited) Here is a zip with 15 Patched Games. New in this archive are: Elektra Glide Spy Master Tempest Xtreem Demo Games from the previous archive, but patched again with the newest routines: Digi Duck Drop It! Flowers Mania Goldhunter International Karate Jet Set Willy 2007 Pyramid Swapz The Extirpator Wloczykij World Championship Karate Zybex Edited October 6, 2015 by ProWizard 1 Quote Link to comment Share on other sites More sharing options...
Marius Posted October 6, 2015 Author Share Posted October 6, 2015 Now I really have to learn how to code for PC platform, so I can create a tool that does all the patching for you... Quote Link to comment Share on other sites More sharing options...
darwinmac Posted October 19, 2015 Share Posted October 19, 2015 ProWizard, I was able to use your latest patch successfully in order to get Slor's AtariNet game to work with the AtariMax FAT-32 loader. Initially, the game just hung. Next, I tried the Side loader that was modified for the MyIDE-II. The game ran with that but the colors were all wrong. Once I used your patch, the game ran perfectly with the AtariMax loader. While I did buy the cartridge, I can see having it on the MyIDE-II as being very convenient. Bob C 1 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.