E474 Posted October 12, 2022 Share Posted October 12, 2022 (edited) Would it be practical to create an App Key .key file for the ATR being accessed on the TNFS server? Maybe use DUNIT for the drive the ATR is mounted on (this would be for hacking in code for saving/parsing hi scores). I'm kind of fumbling with the idea, but it would separate out a read-only ATR, and a read-write .key file. I appreciate this would require some hacking of legacy disks, rather than relying on their R/W sector I/O code, but it could provide a consistent mechanism for shared hi-score tables. Edited October 12, 2022 by E474 Added note on hacking legacy disks. Quote Link to comment Share on other sites More sharing options...
tschak909 Posted October 12, 2022 Author Share Posted October 12, 2022 See what you can come up with I literally did this to spur on some activity. Quote Link to comment Share on other sites More sharing options...
tschak909 Posted October 12, 2022 Author Share Posted October 12, 2022 The High Score Enabled code is now in production. -Thom Quote Link to comment Share on other sites More sharing options...
tschak909 Posted October 12, 2022 Author Share Posted October 12, 2022 A video showing the High Score Enabled feature now available for the #atari8bit #fujinet. By using a few previously unused bytes in the header of ATR files, a range of sectors can be specified to be read-write, even if the disk image is mounted read only. With this feature, games on public TNFS servers can have high score tables on their disk images marked read-write, and scores will be written back to the server, transparently, without needing to change the game. In addition, web pages can be set up to post high score table changes, as demonstrated in the video. You can see the scores for these games here, and they refresh every 30 seconds: http://scores.irata.online/ Youtube video: enjoy -Thom 2 1 Quote Link to comment Share on other sites More sharing options...
MichaG Posted October 12, 2022 Share Posted October 12, 2022 It works 1 Quote Link to comment Share on other sites More sharing options...
tschak909 Posted October 12, 2022 Author Share Posted October 12, 2022 Ok, high score pages have been overhauled, and given a consistent styling based on screenshots from each game. What do you all think? 7 Quote Link to comment Share on other sites More sharing options...
tschak909 Posted October 12, 2022 Author Share Posted October 12, 2022 (edited) Anybody have any ideas on how we can graft on high-score tables to other existing games? (maybe e.g. a piece of code that could be patched on, which takes over screen/keyboard/etc so we can grab initials, and post to server, then restore what we took over?) -Thom Edited October 12, 2022 by tschak909 Quote Link to comment Share on other sites More sharing options...
+x=usr(1536) Posted October 13, 2022 Share Posted October 13, 2022 Just curious - is scores.irata.online currently updating correctly? I achieved three scores last night that were entered into the high score tables in the respective games (Frogger, Spelunker, and BC's Quest For Tires), but none appear to be there today. In fact, it looks exactly the same as before I started playing. FWIW, initials entered were USR, disk images were mounted RO, and were selected from the High Score Enabled directory. Quote Link to comment Share on other sites More sharing options...
tschak909 Posted October 13, 2022 Author Share Posted October 13, 2022 11 minutes ago, x=usr(1536) said: Just curious - is scores.irata.online currently updating correctly? I achieved three scores last night that were entered into the high score tables in the respective games (Frogger, Spelunker, and BC's Quest For Tires), but none appear to be there today. In fact, it looks exactly the same as before I started playing. FWIW, initials entered were USR, disk images were mounted RO, and were selected from the High Score Enabled directory. Did you update your firmware? (You can see in the fujinet flasher if high score mode gets enabled when the high score table blocks are written) -Thom 1 Quote Link to comment Share on other sites More sharing options...
+x=usr(1536) Posted October 13, 2022 Share Posted October 13, 2022 6 minutes ago, tschak909 said: Did you update your firmware? (You can see in the fujinet flasher if high score mode gets enabled when the high score table blocks are written) -Thom My bad - I missed the announcement that a new firmware version was out. I'll take care of that this evening. Apologies for the inconvenience Quote Link to comment Share on other sites More sharing options...
E474 Posted October 13, 2022 Share Posted October 13, 2022 (edited) 21 hours ago, tschak909 said: Anybody have any ideas on how we can graft on high-score tables to other existing games? (maybe e.g. a piece of code that could be patched on, which takes over screen/keyboard/etc so we can grab initials, and post to server, then restore what we took over?) -Thom If you could put the set username code into the FujiNet config program, you could just hack in an SIO call that takes the score as a parameter, and wouldn't have to worry about messing up the screen, handle keyboard input, etc., mid-game. Actually, if you could define Player 1, Player 2, Player 3, etc., names in config, this might be a bit more useful. Edited October 13, 2022 by E474 Added in multi player name comment in config Quote Link to comment Share on other sites More sharing options...
tschak909 Posted October 13, 2022 Author Share Posted October 13, 2022 (edited) 2 hours ago, E474 said: If you could put the set username code into the FujiNet config program, you could just hack in an SIO call that takes the score as a parameter, and wouldn't have to worry about messing up the screen, handle keyboard input, etc., mid-game. Actually, if you could define Player 1, Player 2, Player 3, etc., names in config, this might be a bit more useful. definitely something to explore. would you like to take a crack at implementing it? I can point you in the right direction. I'm also investigating writing an asm high score routine that can be easily called and bolted on that writes to sector 720. We have some games with source code that build into usable code, such as: https://atariwiki.org/wiki/attach/PAC-MAN/PAC-MAN_Source_Code_2.zip -Thom Edited October 13, 2022 by tschak909 Quote Link to comment Share on other sites More sharing options...
E474 Posted October 13, 2022 Share Posted October 13, 2022 Hi @tschak909, OK, I will see if I can put something together, but I know I won't have much free time until next weekend (22nd). Also, I have a DevKit ESP32, but haven't bread boarded it together yet (I think I have all the other components), but I do have a FujiNet-PC setup on a Raspberry Pi Model 1 that should be fine. Wouldn't it be easier to delegate sector writing to the FujiNet, which just uses the sector(s) specified in the ATR header, rather than a fixed sector #? You could also always submit high scores to the FujiNet, but it would only update the high score list if the score was actually in the top 10, 20, etc. Quote Link to comment Share on other sites More sharing options...
tschak909 Posted October 13, 2022 Author Share Posted October 13, 2022 3 minutes ago, E474 said: Hi @tschak909, OK, I will see if I can put something together, but I know I won't have much free time until next weekend (22nd). Also, I have a DevKit ESP32, but haven't bread boarded it together yet (I think I have all the other components), but I do have a FujiNet-PC setup on a Raspberry Pi Model 1 that should be fine. Wouldn't it be easier to delegate sector writing to the FujiNet, which just uses the sector(s) specified in the ATR header, rather than a fixed sector #? You could also always submit high scores to the FujiNet, but it would only update the high score list if the score was actually in the top 10, 20, etc. I'm trying to prevent the need for a dedicated server. -Thom Quote Link to comment Share on other sites More sharing options...
E474 Posted October 14, 2022 Share Posted October 14, 2022 Hi @tschak909, I meant the FujiNet firmware would process the high score code. I thought it would be something like: siov($70,Dunit,Dcommand=$add_high_score,write,dbuf=address_of_score,dbyte=$80,daux=type_of_score) where type_of_score would be one of: daux1 = player_# + daux2 = one of ATASCI_TEXT SCREEN_BYTE 2_BYTE_INT 4_BYTE_INT 4_BYTE_BCD 6_BYTE_BCD etc. Then to hack in the call to siov, you just need to figure out the screen location or memory location containing the value for the score in the legacy game you want to save. The firmware processes the data frame against the highscore sector data according to daux2 to see if it's a high score, and updates it using the text for the player# and the processed data for the high score contained in the data frame. High score processing is done on the high score sectors specified by the ATR header bytes. Quote Link to comment Share on other sites More sharing options...
tschak909 Posted October 14, 2022 Author Share Posted October 14, 2022 (edited) 40 minutes ago, E474 said: Hi @tschak909, I meant the FujiNet firmware would process the high score code. I thought it would be something like: siov($70,Dunit,Dcommand=$add_high_score,write,dbuf=address_of_score,dbyte=$80,daux=type_of_score) where type_of_score would be one of: daux1 = player_# + daux2 = one of ATASCI_TEXT SCREEN_BYTE 2_BYTE_INT 4_BYTE_INT 4_BYTE_BCD 6_BYTE_BCD etc. Then to hack in the call to siov, you just need to figure out the screen location or memory location containing the value for the score in the legacy game you want to save. The firmware processes the data frame against the highscore sector data according to daux2 to see if it's a high score, and updates it using the text for the player# and the processed data for the high score contained in the data frame. High score processing is done on the high score sectors specified by the ATR header bytes. Ah ok I see. Interesting. gonna grind this through my head. What can I do to help? -Thom Edited October 14, 2022 by tschak909 Quote Link to comment Share on other sites More sharing options...
tschak909 Posted October 14, 2022 Author Share Posted October 14, 2022 Meanwhile, I am experimenting with the Pac-Man source code that was dropped a few years ago, to see if I can add high scores to it. This is what is possible when source code is preserved https://github.com/FujiNetWIFI/fujinet-high-scores/tree/main/atari-game-ports/pac-man Quote Link to comment Share on other sites More sharing options...
E474 Posted October 14, 2022 Share Posted October 14, 2022 1 hour ago, tschak909 said: Ah ok I see. Interesting. gonna grind this through my head. What can I do to help? -Thom Thanks! I will try and set up a dev environment on Bullseye, and figure out which bits of FujiNet need to be extended, but I am time limited at the moment. 2 1 Quote Link to comment Share on other sites More sharing options...
tschak909 Posted October 14, 2022 Author Share Posted October 14, 2022 Some games ALSO have a high-score routine, but no way to persist it. These could also be patched. also Miner 2049'er 1 Quote Link to comment Share on other sites More sharing options...
+x=usr(1536) Posted October 15, 2022 Share Posted October 15, 2022 9 hours ago, tschak909 said: Some games ALSO have a high-score routine, but no way to persist it. These could also be patched. I'd hazard a guess that a MAME-style approach to saving high scores on machines that originally had no persistence for them could work. https://github.com/mamedev/mame/blob/5ab93130eb223aadabb6faebb1b4299e6000120c/docs/source/plugins/hiscore.rst Basically, the hiscore.dat file contains info on the relevant memory locations; the plugin reads the data in those locations and dumps it out to disk. Pretty straightforward; the only real PITA is figuring out exactly where in memory they reside. Not impossible by any means, but often time-consuming even with the debugger. Quote Link to comment Share on other sites More sharing options...
+Philsan Posted October 15, 2022 Share Posted October 15, 2022 As already writen on FB, this is a very nice feature! I would add game's name in high score web page. Jawbreaker II hangs when "Congratulations. You have made one of the high scores. Please enter your initials" appears. Other games work. Quote Link to comment Share on other sites More sharing options...
tschak909 Posted October 15, 2022 Author Share Posted October 15, 2022 2 hours ago, Philsan said: As already writen on FB, this is a very nice feature! I would add game's name in high score web page. Jawbreaker II hangs when "Congratulations. You have made one of the high scores. Please enter your initials" appears. Other games work. @DjayBee? Quote Link to comment Share on other sites More sharing options...
tschak909 Posted October 15, 2022 Author Share Posted October 15, 2022 Adventure Intl's Rear Guard has been High Score Enabled. TNFS: apps.irata.online/Atari 8-bit/Games/High Score Enabled/Rear Guard (BASIC).atr Scores: http://scores.irata.online/rearguard.html Quote Link to comment Share on other sites More sharing options...
+DjayBee Posted October 15, 2022 Share Posted October 15, 2022 1 hour ago, tschak909 said: @DjayBee? Thanks for the hint. It checks the bad sector again after writing the high-score sector. This one should work: Jawbreaker II (1982)(SierraVision)(US)[!][cr CSS].atr Quote Link to comment Share on other sites More sharing options...
+DjayBee Posted October 16, 2022 Share Posted October 16, 2022 Scoth42 on Discord found another non-working title. Zombies has a checksum routine which kicks in when you leave the first room. This file should work: Zombies (1983)(Bram)(US)[m][cr CSS].atr 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.