TRS-80 CoCo / CoCo2 - Shark Treasure - EMU - Points (Peak Score) - 244,000

Is this Performance Claim Valid?

    This poll is closed
This poll is closed
  1. TRS-80 CoCo / CoCo2 - Shark Treasure - EMU - Points (Peak Score) - 244,000

    02-17-2022, 10:45 PM
    vzaar-player


    EMU - Points (Peak Score)
    Track
    https://www.twingalaxies.com/scores.php?scores=238501
    Rank
    1
    Rules
    This game has no settings for the player to select, therefore no specific rules apply. Shark Treasure's scoring system is different than usual. There are two kinds of score: your current score (shown in the higher part of the screen on the left, it's the amount of gold you currently own) and your peak score (on the right, this is not related to the previous games you played but it's the maximum amount of gold you managed to earn during the game you're playing). When a shark eats you, you don't lose a life (you don't have lives) but your current score decreases (while your displayed peak score remains intact, of course). If your current score goes below zero, it's game over. Hence the only way to compete here is by comparing the peak scores reached by different players.
    Submission Message
    Performed 2/17/2022 into 2/18/2022 using XRoar v1.0.9 Emulator. Cassette image was from ColorComputerArchive.com Keyboard controls used, emulating a joystick.
    Two attempts in video, record game starts at 04:37.
    Score submitted is the highest peak score displayed before the game ended shortly after 59:00.

    I had experienced this sudden game over about a year ago with the same score. At first I thought it was a bug, but investigating the code shows it is intentional.
    The current score is a single byte located at $1C45 in memory. A max score of 255000 would have been possible before it would roll back to 0. In the main program loop the score is checked to see if it is higher than 245000, if so the program will branch to the game start location. It will be as if you restarted/loaded the game. Details to follow...approaching 1k word maximu


    Watching the Taylor and Amy show early in the video. These ladies are a hoot. Give 'em a lookseee at https://www.youtube.com/channel/UC09...d6HQI0B0kWtLgQ

    Thanks Rogerpoco thanked this post
    Likes Luigi Ruffolo, Rogerpoco liked this post
  2. 02-17-2022, 10:52 PM
    Hit the 1k word limit in submission post...

    Code that checks the score.


    Line 3E0B loads the accumulator register with the value in memory location $1C45, which is the current score.
    Line 3E0E compares that value with the value $F6, 246.
    Line 3E10 if current score is higher than 246 branch to the beginning. Lower, continue game.


    So, in my game I was fine at 244k but as soon as it started adding the score of that last bar of gold it put me over 246 and reset the game.


    This score checking deal appears to only happen in the main loop. Generally your main loop will check for events and move stuff. If you run into a shark it will jump to a subroutine, do its thing and then return to the main loop. Bring gold back, scoring subroutine. The scoring subroutine is where this score checking should occur, why check the score if no scoring event took place? Odd. And why no check of score being over 245 after or during addition of points to the current score? Odd.


    Anyways, back to the game where I have 244k...had I grabbed two bars of gold, at 6k a bar. The scoring subroutine would have added 12 to my 244 and returned a 0. A byte can't have a value over 255 so it will go back to zero if you go over. 0 is less than 246 go the game would have continued with a score of 0. One shark bite would have done me in since the program actually thinks I have 0 points.

    The only reason I can think of that this was done was so he wouldn't have to add code dealing with the overflow (??)

    Interesting that I found this score in a Rainbow magazine, July 1984. This would be the highest score that would have displayed on the screen.


    I'm not a game dev or a 6809 assembly guy, so I may be blowing smoke... :)
    Thanks Luigi Ruffolo, Rogerpoco thanked this post
    Likes Rev John, Rogerpoco liked this post
  3. 02-18-2022, 03:47 AM
    Super Job there!!!
    Pretty neat about the coding/scoring.
    Haha, you really took a chance bringing that (next to)last piece of gold back to the house, the shark was right on you!!!

    Yup, beat my paltry. pathetic 35K!
    :D

    Kinda monotonous, but I was sure someone with more patience and skill could play this with "a plan", you really seem to have it under control, the flash bombs and stuff, really nice.

    Accepted!!!

    Big Thanks, btw, for teaching me the "words" I have to type, DIR, EXEC, etc, to even get this sucker running!!!
    :D
    Droplets of yes and no
    In an ocean of maybe
    Likes onlyinajeep liked this post
Results 1 to 3 of 3
Join us