+cmadruga Posted June 12, 2021 Author Share Posted June 12, 2021 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. 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 Quote Link to comment Share on other sites More sharing options...
+cmadruga Posted June 12, 2021 Author Share Posted June 12, 2021 Sorry, didn't see your edit to the previous post. Quote Link to comment Share on other sites More sharing options...
+DZ-Jay Posted June 12, 2021 Share Posted June 12, 2021 (edited) 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 June 12, 2021 by DZ-Jay Quote Link to comment Share on other sites More sharing options...
+DZ-Jay Posted June 12, 2021 Share Posted June 12, 2021 (edited) 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 June 12, 2021 by DZ-Jay Quote Link to comment Share on other sites More sharing options...
+cmadruga Posted June 12, 2021 Author Share Posted June 12, 2021 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. Quote Link to comment Share on other sites More sharing options...
+DZ-Jay Posted June 12, 2021 Share Posted June 12, 2021 (edited) 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 June 12, 2021 by DZ-Jay Quote Link to comment Share on other sites More sharing options...
+cmadruga Posted June 12, 2021 Author Share Posted June 12, 2021 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. Quote Link to comment Share on other sites More sharing options...
+DZ-Jay Posted June 12, 2021 Share Posted June 12, 2021 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. Quote Link to comment Share on other sites More sharing options...
+cmadruga Posted June 13, 2021 Author Share Posted June 13, 2021 (edited) Ok, here is a first pass at the account verifier. 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. - 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 June 13, 2021 by cmadruga 2 Quote Link to comment Share on other sites More sharing options...
+cmadruga Posted June 13, 2021 Author Share Posted June 13, 2021 (edited) 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 June 13, 2021 by cmadruga Quote Link to comment Share on other sites More sharing options...
carlsson Posted June 13, 2021 Share Posted June 13, 2021 (edited) 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 June 13, 2021 by carlsson Quote Link to comment Share on other sites More sharing options...
+cmadruga Posted June 13, 2021 Author Share Posted June 13, 2021 Must be something with how you are operating the keypad. I just tested your first one and it worked. Quote Link to comment Share on other sites More sharing options...
carlsson Posted June 13, 2021 Share Posted June 13, 2021 Curious! Same ROM? I'm using jzintv v1.0 (2016) and use the PC numpad for entering the codes. Quote Link to comment Share on other sites More sharing options...
+cmadruga Posted June 13, 2021 Author Share Posted June 13, 2021 The first code from the friend also worked: Quote Link to comment Share on other sites More sharing options...
carlsson Posted June 13, 2021 Share Posted June 13, 2021 (edited) Should I not enter the name, then press Enter on the PC keyboard, followed by the account number and Enter? Your GIF animation has a blinking white cursor. I have a solid, purple/wine red cursor. Edited June 13, 2021 by carlsson Quote Link to comment Share on other sites More sharing options...
+cmadruga Posted June 13, 2021 Author Share Posted June 13, 2021 (edited) Are you perhaps filling the name with spaces after "Kenneth" so it will fill all characters? If yes, that is not necessary. Just press enter when done. Meaning, after entering the last "H". Edited June 13, 2021 by cmadruga Quote Link to comment Share on other sites More sharing options...
carlsson Posted June 13, 2021 Share Posted June 13, 2021 No, I'm not padding it out. However the different colour of the cursor intrigues me, if you're using the same ROM that you posted and I'm getting a solid purple one while you're getting a blinking white one. Quote Link to comment Share on other sites More sharing options...
+cmadruga Posted June 13, 2021 Author Share Posted June 13, 2021 Here's a bin+cfg version. Let's see if that makes a difference. prog.cfgprog.bin I just tested the combination below: Quote Link to comment Share on other sites More sharing options...
+cmadruga Posted June 13, 2021 Author Share Posted June 13, 2021 The entries with blank names do not work. Probably something I have to tweak. Quote Link to comment Share on other sites More sharing options...
carlsson Posted June 13, 2021 Share Posted June 13, 2021 Yes, it yielded a SUPER FAST blinking white cursor and the codes work! Quote Link to comment Share on other sites More sharing options...
+cmadruga Posted June 13, 2021 Author Share Posted June 13, 2021 Ha. I wonder why the rom was not working on your side. Quote Link to comment Share on other sites More sharing options...
carlsson Posted June 13, 2021 Share Posted June 13, 2021 (edited) 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 June 13, 2021 by carlsson Quote Link to comment Share on other sites More sharing options...
+cmadruga Posted June 13, 2021 Author Share Posted June 13, 2021 Could you try this rom? prog.rom Quote Link to comment Share on other sites More sharing options...
carlsson Posted June 13, 2021 Share Posted June 13, 2021 (edited) That last ROM works correctly at my end. It is 8776 bytes so 7 bytes more than the one I built but 1 byte less than the first one you posted. Edited June 13, 2021 by carlsson Quote Link to comment Share on other sites More sharing options...
+cmadruga Posted June 13, 2021 Author Share Posted June 13, 2021 Well, not sure what happened. I basically just renamed this rom that worked with the name I originally posted. 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.