Jump to content
IGNORED

Fun with tiles: another weekend experiment


cmadruga

Recommended Posts

2 minutes ago, DZ-Jay said:

 

Well, that's easy, it's because I forgot to "AND $FF" to the 16-bit variable.  DOH!

 

I should really check my code before posting.  :dunce:

Now we are cooking! Thanks!!!

 

 

#name_checksum = $05  ' Iterations
    #check_byte    = $2C  ' BCD high-byte + low-byte
    tmp            = 0

    FOR I = 1 to #name_checksum
      ' Compute temporary obfuscation code
      tmp = ((#check_byte * 2) XOR #check_byte)
      tmp =         ((tmp * 2) XOR #check_byte)
      tmp =         ((tmp * 4) XOR #check_byte)

      ' Compute check-byte
      #check_byte = (#check_byte * 2) AND $FF
      IF (tmp AND $80) THEN
        #check_byte = (#check_byte OR 1)
      END IF
      PRINT AT 0 COLOR 7,<>#check_byte," "
      GOSUB wait_for_action_button
    NEXT

 

Link to comment
Share on other sites

9 minutes ago, cmadruga said:

Now we are cooking! Thanks!!!

 

 

#name_checksum = $05  ' Iterations
    #check_byte    = $2C  ' BCD high-byte + low-byte
    tmp            = 0

    FOR I = 1 to #name_checksum
      ' Compute temporary obfuscation code
      tmp = ((#check_byte * 2) XOR #check_byte)
      tmp =         ((tmp * 2) XOR #check_byte)
      tmp =         ((tmp * 4) XOR #check_byte)

      ' Compute check-byte
      #check_byte = (#check_byte * 2) AND $FF
      IF (tmp AND $80) THEN
        #check_byte = (#check_byte OR 1)
      END IF
      PRINT AT 0 COLOR 7,<>#check_byte," "
      GOSUB wait_for_action_button
    NEXT

 

 

That'll work!  Or you could switch "#check_byte" to an 8-bit variable and avoid the hassle. :)

name_checksum = $05  ' Iterations
check_byte    = $2C  ' BCD high-byte + low-byte
tmp           = 0

FOR I = 1 to name_checksum
  ' Compute temporary obfuscation code
  tmp = ((check_byte * 2) XOR check_byte)
  tmp =        ((tmp * 2) XOR check_byte)
  tmp =        ((tmp * 4) XOR check_byte)

  ' Compute check-byte
  check_byte = (check_byte * 2)
  IF (tmp AND $80) THEN
    check_byte = (check_byte OR 1)
  END IF
NEXT

 

There really is no need to consume a 16-bit variable on this.

 

   -dZ.

Edited by DZ-Jay
Link to comment
Share on other sites

7 minutes ago, cmadruga said:

Sorry, didn't see your edit to the previous post.

No worries.  I tend to edit instead of posting new messages.  I re-posted it anyway. :)

 

I'm really excited about your game, and I can't wait to test it.  (hint, hint!)

Edited by DZ-Jay
Link to comment
Share on other sites

You are not missing much, it is barely playable now. 

 

At least the alert system (red / purple blocks) is up and running, and you can make some money by heading to those blocks and capturing some Slimers.

I have also synced up the PK count across all screens (city map, driving, buildings). That means the ghosts converging to Zuul keep moving in real time even when you are not looking. I don't remember if the original does that, but it felt right to do it like that.

 

Anyway, I thought having this game be compatible with the original GB account system would be pretty cool and make it feel more "legit" in my mind.

Link to comment
Share on other sites

4 minutes ago, cmadruga said:

You are not missing much, it is barely playable now. 

Ah, no worries.  I can't wait to play it but ... really, I can wait for it to be ready. ?

 

Quote

At least the alert system (red / purple blocks) is up and running, and you can make some money by heading to those blocks and capturing some Slimers.

I have also synced up the PK count across all screens (city map, driving, buildings). That means the ghosts converging to Zuul keep moving in real time even when you are not looking. I don't remember if the original does that, but it felt right to do it like that.

I don't really remember, but I think it did.  In any case, I agree that it feels right to do that.

 

Quote

Anyway, I thought having this game be compatible with the original GB account system would be pretty cool and make it feel more "legit" in my mind.

Plus, players can enter any code generated from one of those Account Generators on the Web, or the ones they noted down when they were kids. ?

 

     -dZ.

Edited by DZ-Jay
Link to comment
Share on other sites

30 minutes ago, cmadruga said:

I have also synced up the PK count across all screens (city map, driving, buildings). That means the ghosts converging to Zuul keep moving in real time even when you are not looking. I don't remember if the original does that, but it felt right to do it like that.

 

26 minutes ago, DZ-Jay said:

I don't really remember, but I think it did.  In any case, I agree that it feels right to do that.

 

Ha.

I just checked both the C64 and the MSX versions, and neither does the real time city ghost movement thing.

PK will increase while you are driving or capturing ghosts in front of buildings... but the position of the ghosts will stay the same as when you left them.

 

This is an important detail actually, because when a ghost reaches Zuul, the PK count is supposed to jump by 100.

PK can actually jump by up to 400 if all ghosts reach Zuul at the same time.

 

By freezing the ghosts' positions in place while not on screen, the original game is giving the player an advantage.

 

On the other hand, the way I implemented it, you will see PK increasing and also jumping every now and then, as the movement from the city ghosts continues to be simulated even while they are off screen.

As you return to the city map, their positions will be up-to-date.

 

Link to comment
Share on other sites

23 minutes ago, cmadruga said:

 

 

Ha.

I just checked both the C64 and the MSX versions, and neither does the real time city ghost movement thing.

PK will increase while you are driving or capturing ghosts in front of buildings... but the position of the ghosts will stay the same as when you left them.


 

Well, I know I have terrible memory. Hehehe.

 

And you are right that you will need to follow that in order to replicate the original mechanics of PK computation for the end game.

 

23 minutes ago, cmadruga said:

By freezing the ghosts' positions in place while not on screen, the original game is giving the player an advantage.

 

That is true, although I imagine it could have been a consequence of stringing together the mini-games with minimum global state. ;)

 

23 minutes ago, cmadruga said:

On the other hand, the way I implemented it, you will see PK increasing and also jumping every now and then, as the movement from the city ghosts continues to be simulated even while they are off screen.

As you return to the city map, their positions will be up-to-date.

It seems like a more natural approach (which is why it felt right to assume the original did), but it may precipitate the end game, preventing the player from catching more ghosts and making more money.

 

I guess it is something to test once the entire game is finished to see if it works well.  If it doesn't affect the difficulty balance or progression significantly, then I still believe your current implementation is the superior approach.  :)


Besides, there is already a $500 masterpiece that is a perfect replica of the original, so less pressure on you to attain 100% fidelity.

 

   dZ.

Link to comment
Share on other sites

Ok, here is a first pass at the account verifier.

 

gb_acct3.gif.fa0a93c2d9f9b9e15857351cc5e26c7a.gif

 

If anyone would be interested in testing different account names and number combinations, I'm attaching the rom here.

 

GB_acct_v0.1.rom

 

Using the program is simple:

 

- account names can have up to 19 characters.

 Here's how the keypad works when entering names... just like old cell phones.

Once you hit enter, it will switch to entering an account number.

 

image.png.8a0e6868acd4129ad23b9bfbfb72fb12.png

 

- account numbers will always have 8 digits.

I'm only allowing for numeric account numbers.

If the number you want to enter has fewer digits than that, just fill it to the left with zeros.

Press enter once all digits are entered.

 

- If the combination works, you will see the account balance. Just like the gif I posted here.

- If not, either the combination is wrong or the program needs some tweaking. Either way, some debug information is shown.

- To enter another name/number, press an action button.

 

If you have a combination that works on the C64 version but does not work when testing with this rom, please let me know.

I haven't tested it much.

 

Edited by cmadruga
  • Like 2
Link to comment
Share on other sites

Quick tests, here are some I found in random C64 strategy/cheat web sites that seem to work:

Of course I could just use online account generators to perform tests, but where is the fun in that? ?

 

Name (number)

 

TRON (00000999)  $240,000

GOO (99999999)  $244,900

MUSTIS (11111111)  $244,900

ANDY (00000777)  $1,620,000

Edited by cmadruga
Link to comment
Share on other sites

33 minutes ago, cmadruga said:

If you have a combination that works on the C64 version but does not work when test with this rom, please let me know.

I'm not sure what I'm doing wrong, but not a single combination works for me!

 

My older brother once set these scores, which all resolve correctly on Perifractic's site:

 

CARLSSON,KENNETH

66544700 = $23,600

64315500 = $27,400

41306400 = $32,100

00156200 = $34,000

 

Some of his friends:

WEDLUND JOAKIM

07355100 = $24,700

07025500 = $28,700

 

CALLE

03666100 = $38,300

 

I tried every single one of those but your program says those are invalid?

 

A couple other cheat codes:

[ Blank name ] + code 458 = $1,000,000

[ Blank name ] + code 614 = $300,000

 

Edit: Even the ones you reported as working, doesn't work with the ROM you posted?!? Not even the Donald Duck one goes through?!?

Edited by carlsson
Link to comment
Share on other sites

I tried bin2rom:

 

SEGMENT ofs 0000  len 000E  addr 4800  FLAGS: R---P
SEGMENT ofs 000E  len 0926  addr 5000  FLAGS: R---P
SEGMENT ofs 0934  len 056C  addr C040  FLAGS: R---P

 

The resulting ROM file is 8769 bytes, compared to the ROM file you uploaded that is 8777 bytes.

 

The ROM file I built myself of course works as well.

Edited by carlsson
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...