Jump to content
IGNORED

Come help us High Score Enable more games!


Recommended Posts

Hi, Everyone.

 

Now that many of the existing Atari 8-bit games that have high score tables have been ported to take advantage of FujiNet's #HighScoreEnabled feature, I think it would be a good idea to start adding high score tables to games that do not already have them.

 

To start, I've done changes to two games:

 

* PAC-MAN: https://github.com/FujiNetWIFI/fujinet-high-scores/tree/main/atari-game-ports/pac-man 
* and Donkey Kong: https://github.com/FujiNetWIFI/fujinet-high-scores/tree/main/atari-game-ports/dkong

 

Both of these games use the same basic feature set for implementing high scores:

 

* ANTIC Mode 6 display, cutting into an existing screen via display list
* 10 score places
* 7 digit score
* 3 initials for name
* stored on sectors 719 and 720, which are also marked as High Score enabled so that the FujiNet will write to them.

 

The pattern is always the same for implementation, find a spot where we can jump to our code, then:

 

* Read sectors from disk
* do the high score thing
* if score table changed, write sectors back.
* go back to game

 

There are also score-scraper programs, written in C and compilable on any standard PC, which detect when a disk image is changed, and output a new score table HTML file to be displayed on a web server, these can be seen here: http://scores.irata.online/ and in source form: https://github.com/FujiNetWIFI/fujinet-high-scores/tree/main/atari

 

One trick that's done here is that a read to sector 1 is done, and thrown away, so that the disk cache on the FujiNet is invalidated.

 

A benefit of this implementation, is that it relies entirely on merely reading and writing sectors, and does not use any networking functionality, so even non-FujiNet users get the benefit of a locally stored high score enabled game.

 

I am writing this as a plea, I think this is something that others can help with, and we all can benefit, by taking the example code that I've posted above, and adapting it to all the games (e.g. Dig-Dug, Berzerk, Pole Position, etc.) so that we can have something the whole community can benefit from.

 

Can anyone else help? :)

 

-Thom
 

  • Like 3
Link to comment
Share on other sites

I've written my own disassembler, it has an output option to be in MADS format, I think it produces

an output that will recompile without any changes, but not done anything too big, want me to give

it a try with something ?

I might have to add a small header to the binary as the disassembler currently only does .XEX type files.

 

EDIT: Never mind, just tried a ROM but it looks like I need to do a little work on it :)

 

Edited by TGB1718
Link to comment
Share on other sites

Hey guys, I've added a README.md to the atari-game-ports part of the fujinet-high-scores-repo.

 

https://github.com/FujiNetWIFI/fujinet-high-scores/tree/main/atari-game-ports

 

Its current content:

 

 

atari-game-ports

these are games that are having High Score Enabled functionality added to them.

Can you help? Grab one, and use one of the done games as a template to add Hiscore to the others.

TODO

  • berzerk
  • digdugv2
  • miner-2049er
  • moon-patrol-redux
  • popcorn
  • qix

DONE

  • baja-buggies
  • centipede
  • dkong
  • pac-man
  • pengo
  • rear-guard

Inside the working examples

Inside most of the working examples, e.g. centipede and dkong, there is a general pattern followed which generates a complete working disk, already high score enabled.

Requirements

  • a working CC e.g. GCC (for compiling write-high-score and high-score-enable)
  • The MADS assembler
  • the GNU Make tool

Makefile

  • Builds a single density (128 bytes/sector) ATR disk with hi score sectors on 719 and 720.
  • Puts picoboot.bin on the boot sectors.
  • Places game as the autorun for picoboot
  • Writes the high score sectors to 719 and 720
  • Writes the high score enabled ATR header marking sectors 719 and 720

hiscore.asm

The hiscore routines to be adapted, it is intended to call jsr hiscore when it needs to take over. It needs to do whatever it needs to do to:

  • Alter display list to display high score (custom display list)
  • load hi score table into screen memory (HISCRL using DSKINV)
  • handle keypresses to get initials (see HRKEY)
  • save hi score table back onto sectors 719/720 (hiscrw using DSKINV)

Since many of these games take over the system completely, the common trick is to:

  • Save existing vectors (VVBLKI, VVBLKD, VKEYBD, VDSLST)
  • Swap in ours along with display list
  • Do the hiscore thing
  • Restore the vectors.

I tried to place notes as I reverse engineered many of the games.

hiscore_table.asm

The hiscore table which is placed on sectors 719 and 720. Must be 256 bytes long.

write-high-score

This simple C program reads the assembled hiscore_table.bin, and places it on sectors 719 and 720 of the target disk image.

high-score-enable

This, also simple, C program writes the amended ATR disk header which marks sectors 719 and 720 as high score enabled.

Link to comment
Share on other sites

1 hour ago, DjayBee said:

Did I already mention that I hate Dark Mode even if it is pseudo-dark?

;)

 

And I wildly guess that somebody who creates (only) the needed patch but does not have GCC to compile the scraper, is also very welcome to submit what he did.

yup all the above. This is just what I did to make it all nice and neat. I'm just following my policy of making every bit of what I do available. :D :)

 

-Thom

 

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...