tschak909 Posted July 21, 2023 Share Posted July 21, 2023 To any #Atari8bit game modders out there: What's your toolchain for taking a binary, cleaning up extraneous segments, and outputting a clean disassembly that can be modified? I am trying to bring more games into the #FujiNet #HighScoreEnabled fold. -Thom Quote Link to comment Share on other sites More sharing options...
Rybags Posted July 22, 2023 Share Posted July 22, 2023 For stuff I've converted from other systems, IDA Pro (The Interactive Disassembler) comes in really handy. From memory I've done at least one conversion by just using a memory dump from when the game had finished loading and initialized. There's other, free disassemblers around which can do a good job. The way I like to approach such a task is to generate initial source that will just reproduce the program near enough to identical to the original software on it's original system. Once you have that you know you're starting with good code, then start modifying to run on the target system. Much the same applies is it's just a modification of a game on the original system. Though with Stellar Shuttle 480i, I implemented that as a bunch of patches. It's something I'd like to try and tidy up once I find the notes I took about it. Quote Link to comment Share on other sites More sharing options...
tschak909 Posted July 22, 2023 Author Share Posted July 22, 2023 6 hours ago, Rybags said: For stuff I've converted from other systems, IDA Pro (The Interactive Disassembler) comes in really handy. From memory I've done at least one conversion by just using a memory dump from when the game had finished loading and initialized. There's other, free disassemblers around which can do a good job. The way I like to approach such a task is to generate initial source that will just reproduce the program near enough to identical to the original software on it's original system. Once you have that you know you're starting with good code, then start modifying to run on the target system. Much the same applies is it's just a modification of a game on the original system. Though with Stellar Shuttle 480i, I implemented that as a bunch of patches. It's something I'd like to try and tidy up once I find the notes I took about it. Yup, I've been trying to do precisely this, using the available disassemblers I can find. The one that's given me the closest to work from is @ebiguy / @JAC!'s DIS6502 package, but the issues I am having with it, have more to do with the fact that the program itself doesn't render very well on Hi-DPI displays (and the 4.0 test version is very much a rework in progress). -Thom Quote Link to comment Share on other sites More sharing options...
+slx Posted July 22, 2023 Share Posted July 22, 2023 For Shamus+, the (sadly never used) Shamus+ HSC edition and my Apshai life meter hack I just used the Altirra debugger to find those parts of the loaded code where the things I were interested in happened and WUDSN to write patch routines that inserted JSRs, etc. to my code (which then duplicated the stuff my JSR replaced before doing its own stuff. That‘s probably suitable for very small projects and non time-critical code only and would not work with larger programs that don‘t leave as much room for patch code. I think it should be suitable for something like HSC patches that are not time critical. I found it convenient because it saved me from correctly disassembling most of the game. The source of the patching code is available in the Shamus+ package (Using this method I never managed to understand or even locate the code that Shamus uses to convert map data to screen data.) Quote Link to comment Share on other sites More sharing options...
Rybags Posted July 22, 2023 Share Posted July 22, 2023 Shamus rooms are pretty simple, it wouldn't surprise me if it's just a few bytes each for the layout at least. Quote Link to comment Share on other sites More sharing options...
tschak909 Posted July 22, 2023 Author Share Posted July 22, 2023 23 minutes ago, Rybags said: Shamus rooms are pretty simple, it wouldn't surprise me if it's just a few bytes each for the layout at least. There is ONE person on here who CAN answer this: @cathrynm (yes, I am derailing my own thread) -Thom 1 Quote Link to comment Share on other sites More sharing options...
+DjayBee Posted July 22, 2023 Share Posted July 22, 2023 1 hour ago, slx said: For Shamus+, the (sadly never used) Shamus+ HSC edition and my Apshai life meter hack Did you submit these for Thom's high-score enabled FujiNet images? Quote Link to comment Share on other sites More sharing options...
+slx Posted July 22, 2023 Share Posted July 22, 2023 23 minutes ago, Rybags said: Shamus rooms are pretty simple, it wouldn't surprise me if it's just a few bytes each for the layout at least. That‘s right. It uses less than 5 bytes per room. For a detailed description check here. It‘s the code that draws rooms based on these few bytes that eluded me (or which I lacked assembly knowledge and patience to decipher). Quote Link to comment Share on other sites More sharing options...
+slx Posted July 22, 2023 Share Posted July 22, 2023 1 hour ago, DjayBee said: Did you submit these for Thom's high-score enabled FujiNet images? The HSC edition wasn‘t FujiNet enabled. It was meant for the High Score Club andjust contains a special scoring algorithm that measures progress within the game so you can‘t rack up points by moving back and forth between two rooms and shooting the re-spawning baddies. But I should have a look at a FujiNet-enabled edition. Quote Link to comment Share on other sites More sharing options...
tschak909 Posted July 22, 2023 Author Share Posted July 22, 2023 17 minutes ago, slx said: The HSC edition wasn‘t FujiNet enabled. It was meant for the High Score Club andjust contains a special scoring algorithm that measures progress within the game so you can‘t rack up points by moving back and forth between two rooms and shooting the re-spawning baddies. But I should have a look at a FujiNet-enabled edition. If you have something writing to disk, all you need to do is alter the ATR header to allow it to be mounted read-only, and automatically switch to read-write when the high-score sectors are written to: https://github.com/FujiNetWIFI/fujinet-platformio/wiki/High-Score-storage-for-Legacy-Games The fujinet-high-scores repo contains a high-score-enable utility which can do the patch: https://github.com/FujiNetWIFI/fujinet-high-scores/tree/main/atari/high-score-enable -Thom 1 Quote Link to comment Share on other sites More sharing options...
+slx Posted July 23, 2023 Share Posted July 23, 2023 13 hours ago, tschak909 said: If you have something writing to disk, all you need to do is alter the ATR header to allow it to be mounted read-only, and automatically switch to read-write when the high-score sectors are written to: https://github.com/FujiNetWIFI/fujinet-platformio/wiki/High-Score-storage-for-Legacy-Games The fujinet-high-scores repo contains a high-score-enable utility which can do the patch: https://github.com/FujiNetWIFI/fujinet-high-scores/tree/main/atari/high-score-enable -Thom Shamus only keeps a single high score without initials, so I suppose it would need a whole new high score section that communicates with FujiNet. The upside of such a module would be that it could be used with various programs that don’t keep high scores and/or write high scores to disc. Are changed sectors on an ATR the only way to perform entries or would that work through the Network device as well? Edit: I suppose HISCORE.ASM is such a module so I’d just have to convert Shamus to ATR and add that. Quote Link to comment Share on other sites More sharing options...
tschak909 Posted July 23, 2023 Author Share Posted July 23, 2023 7 hours ago, slx said: Shamus only keeps a single high score without initials, so I suppose it would need a whole new high score section that communicates with FujiNet. The upside of such a module would be that it could be used with various programs that don’t keep high scores and/or write high scores to disc. Are changed sectors on an ATR the only way to perform entries or would that work through the Network device as well? Edit: I suppose HISCORE.ASM is such a module so I’d just have to convert Shamus to ATR and add that. The high score enabled bits only use the "Disk" subsystem. I did this to keep the amount of changes and depedencies to a minimum. With the way I came up with, anyone can decide e.g. to deploy the games + web hiscore table at a private party with minimal effort. -Thom 1 Quote Link to comment Share on other sites More sharing options...
tschak909 Posted July 24, 2023 Author Share Posted July 24, 2023 An interesting thing; when you try to disassemble Homesoft's Donkey Kong conversion, you get an overlapping segment. How can you best deal with this? LA00C lda L0E32 Donkey Kong.asm (3409) ERROR: Label LA00C declared twice (BANK=0) -Thom Donkey Kong.zip Quote Link to comment Share on other sites More sharing options...
xxl Posted July 24, 2023 Share Posted July 24, 2023 about 10 years ago I also started with saving hiscore in a separate file on disk in old games but in retrospect I see that this was not a good idea.... fujinet can improve this by downloading the saved hiscore in a shared file on the network. ps. tokens counted how many extra lives the player gained in all sessions - game launches were also counted. 3 1 Quote Link to comment Share on other sites More sharing options...
+DjayBee Posted July 24, 2023 Share Posted July 24, 2023 (edited) 2 hours ago, xxl said: about 10 years ago I also started with saving hiscore in a separate file on disk in old games but in retrospect I see that this was not a good idea.... fujinet can improve this by downloading the saved hiscore in a shared file on the network. Thom's approach combines both. For easy implementation and to keep independent from the network, high-scores are saved to the disk (image). It is advisable to re-read the high-score data from disk after each game to catch other players' entries in the table. If (and only if) one wants a webpage which shows these high-scores, then a server based process grabs the high-score data and writes it to per-game webpages. This process is based on small per-game "scrapers" which interpret the high-score data from the disk. Perhaps you can contribute your patched/modified games for FujiNet's servers. Edited July 24, 2023 by DjayBee Quote Link to comment Share on other sites More sharing options...
tschak909 Posted July 24, 2023 Author Share Posted July 24, 2023 20 minutes ago, DjayBee said: Thom's approach combines both. For easy implementation and to keep independent from the network, high-scores are saved to the disk (image). It is advisable to re-read the high-score data from disk after each game to catch other players' entries in the table. If (and only if) one wants a webpage which shows these high-scores, then a server based process grabs the high-score data and writes it to per-game webpages. This process is based on small per-game "scrapers" which interpret the high-score data from the disk. Perhaps you can contribute your patched/modified games for FujiNet's servers. Yeah, I run a set of high score enabled games on apps.irata.online tnfs, and store the scores here: http://scores.irata.online/ The source code of the various scrapers are here: https://github.com/FujiNetWIFI/fujinet-high-scores/tree/main/atari and they're all written in very plain C, no dependencies other than relying on inotify to notify for file changes (the same can be done in win32, I am just not familiar with the API) There is tons of potential here to take all the classic games and bolt high score tables onto them, and have something we can all share and use. -Thom Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted July 24, 2023 Share Posted July 24, 2023 An old DOS app but still good is the freeware version of IDA - I kept a copy here http://www.mkeates.f9.co.uk/ 1 Quote Link to comment Share on other sites More sharing options...
+MrFish Posted July 24, 2023 Share Posted July 24, 2023 29 minutes ago, Wrathchild said: An old DOS app but still good is the freeware version of IDA You can always download the latest stealware version torrent on Pirate Bay. Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted July 24, 2023 Share Posted July 24, 2023 I get by with the license & version I bought around the turn of the century tbf Quote Link to comment Share on other sites More sharing options...
+MrFish Posted July 24, 2023 Share Posted July 24, 2023 Suit yourself. They still have a free version available directly from the developer, but I don't think it supports 6502. Looks like 6502 is only available in the pro version. Quote Link to comment Share on other sites More sharing options...
+MrFish Posted July 25, 2023 Share Posted July 25, 2023 If you want something free, there's the NSA's open source Ghidra. It's Java based and apparently supports the 6502. I haven't tried it yet, just reading about it now. I imagine 6502 support to be pretty low on the food chain for it, though. [Edit 1] Here's one recommendation I found for it here on AtariAge (this forum, actually), from a couple of years ago. Not sure how much it's progressed (6502 support) since then. [Edit 2] Found this on Github: Ghidra6502 1 Quote Link to comment Share on other sites More sharing options...
+David_P Posted July 25, 2023 Share Posted July 25, 2023 1 hour ago, MrFish said: Found this on Github: Ghidra6502 Uh oh... you my be about to awake another recurring Atari Age topic: Quote Illegal opcodes aren't supported yet. Quote Link to comment Share on other sites More sharing options...
+MrFish Posted July 25, 2023 Share Posted July 25, 2023 11 minutes ago, David_P said: Illegal opcodes aren't supported yet. I'm not sure if that's true of the built-in support for 6502 or not. That comment is by the author (Tom Seddon) about his particular 6502 support improvements. 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.