WHDLoad MantisBT - KarateKid2
View Issue Details
0004593KarateKid2[WHDLoad Installs Games] slavepublic2020-05-02 06:292021-08-02 22:46
ReporterRadertified 
Assigned ToRadertified 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
MachineUAE
CPU68020
CPUSpeed14
ChipSetAGA
GFXCardNone
ChipMem2 MB
FastMem0 MB
WorkbenchOS 3.1
KickROM40 - Kick 3.1
KickSoftNone
WHDLoad18.5
imported
Summary0004593: Karate Kid II - Several text problems
DescriptionThis is a copy of the information from EAB forum post: http://eab.abime.net/showthread.php?t=97735

----

This might be because I'm using the slave under emulation, but I get the feeling it's just a slave that needs updating.

Karate Kid II is missing the following:

- The first opening screen (before the loading screen) is not there. This one: https://i.imgur.com/eAXKYAP.png
- Before each level, you're supposed to see the level name. This is missing. Example: https://i.imgur.com/byrfgTF.png
- After each level, you're supposed to see how many bonus points you scored. This is missing. Example: https://i.imgur.com/FDt6Qdi.png
- After the second round of the ice breaking bonus level, you're supposed to see how many points you scored. This is missing. Only the first round is shown. Example: https://i.imgur.com/LSE5McK.png

And one more which I'm not sure is a bug or not.

After the final encounter when you beat Chozen, the drum begins. Regardless of what you do, you will always get the message "JUST IN TIME - YOU SAVED THE DAY", even if you don't do anything.
I tried various ADFs and they do the same thing. I can't recall if my original did that (it's been decades), so I can't say if this is how the game always was, or if it's a bug, but I feel like it should say something else if he ends up punching you before you punch him.

----

I have just tested using WinUAE on an 1200 2mb 68020 config (fully compatible) and I can confirm all of the above still happens, with the exception of the final encounter because I didn't play that far.

Everything in the above screenshots seems to be related to the "text screen" code being skipped too quickly.
Steps To ReproduceAny time a text screen appears (such as before each level) you see it flash very quickly instead of showing it for a short while as it does from floppy.
TagsNo tags attached.
Attached Files? KarateKid2.asm (3,731) 2020-05-24 01:15
https://whdload.de/mantis/file_download.php?file_id=1006&type=bug
? KarateKid2.slave (604) 2021-04-05 17:28
https://whdload.de/mantis/file_download.php?file_id=1175&type=bug

Notes
(0008591)
Radertified   
2020-05-02 06:58   
Just tried as far back as WHDLoad 10. Same problem with the text.

Tried the original slave (1.0) with both WHDLoad 10 and the latest. Same problem.

Even tried JST with the 1.0 slave and it has the same problem.
(0008684)
Radertified   
2020-05-12 16:36   
I've uploaded a couple of GIFs demonstrating the issue to https://imgur.com/a/oXJavY2

The top GIF is the ADF version (cr SCA - CRC: 6077DA45). You can see immediately that even during loading, a text screen appears. When you press Fire to start the game, you see a text screen saying "Daniel's First Encounter", etc.

The bottom GIF is the WHDLoad slave. All text screens are pretty non-existent. They flash for a fraction of a second and the game continues. (Empty DBF loop?)
(0008836)
Radertified   
2020-05-23 07:15   
I decided to look into this.

The game works fine when I comment out the following in the slave and assemble:

        ;PL_R $c7a ;kill disk operations

Of course, then the disk drive gets accessed which is not what's wanted in a slave. However the text screens all come up and work perfectly.

I'm not sure what that RTS does so if anyone has experience with disassembly, that's all that needs to be fixed :)
(0008840)
Radertified   
2020-05-24 01:15   
I've also gone ahead and written a quick trainer for it when CUSTOM1=1 (no clue how to get this to appear in the WHDLoad splash screen though).

When the trainer is enabled, press key:

1 - toggles player 1 unlimited energy on/off
2 - toggles player 2 unlimited energy on/off
s - skips level - Doesn't skip bonus levels, and buggy on last level

I probably didn't do things correctly in a WHDLoad way because I really don't know how. Example:

move.l #$916d005a,$139d0 ; Restore original p1 lives code

I'm putting the value directly into $139d0 because I know that's where it is in memory, however it should probably be done relative to the base address... no clue how to do that with WHDLoad.
(0008856)
Radertified   
2020-05-28 10:12   
I figured out what was up with the text. It's a timing issue.

I'm not saying that I can fix it, but I think I might be able to do it myself. I don't know, but I'd like to try even if it takes me really long. I'm the only person that's ever reported this issue both here and on EAB so I don't think time matters. I'd like to learn :)
(0009847)
StingRay   
2021-04-05 17:29   
Please try attached slave, I have added delays for the text screens and fixed a few other things.

(0010630)
Radertified   
2021-07-27 20:01   
Oh darn. I didn't know you were working on this.

I've been working on this again for the last week and am just about finished. Added a bunch of trainers, game fixes, etc. All I have left to do is a high score saver, check if there's any more versions to support, and to do proper testing on different configurations. I was planning on releasing it in the next week or two.

I wish I'd logged in earlier!
(0010631)
Radertified   
2021-07-27 20:27   
I don't know how to edit my post but I wanted to add that I just tried your updated slave, StingRay. It works, but not entirely. It's missing the score screens after each round.

I've fixed those as well as restoring text before the ice bonus stage (something like "focus your power for effect"), as well as fixing the final encounter text to work properly when you lose. And just a couple of days ago I had already added the button wait for text screens :)

I'll continue mine and finish it off since it seems to have more done. No sense in you wasting your time here. Your expertise can be used on more important games than this!

Issue History
2020-05-02 06:29RadertifiedNew Issue
2020-05-02 06:58RadertifiedNote Added: 0008591
2020-05-12 16:36RadertifiedNote Added: 0008684
2020-05-14 22:35WeplProjectWHDLoad Installs Games => KarateKid2
2020-05-23 07:15RadertifiedNote Added: 0008836
2020-05-23 10:04StingRayAssigned To => StingRay
2020-05-23 10:04StingRayStatusnew => assigned
2020-05-24 01:15RadertifiedFile Added: KarateKid2.asm
2020-05-24 01:15RadertifiedNote Added: 0008840
2020-05-28 10:12RadertifiedNote Added: 0008856
2021-04-05 17:28StingRayFile Added: KarateKid2.slave
2021-04-05 17:29StingRayNote Added: 0009847
2021-04-05 17:29StingRayNote Edited: 0009847bug_revision_view_page.php?bugnote_id=9847#r1352
2021-07-27 20:01RadertifiedNote Added: 0010630
2021-07-27 20:27RadertifiedNote Added: 0010631
2021-08-02 22:46RadertifiedAssigned ToStingRay => Radertified
2021-08-02 22:46RadertifiedStatusassigned => resolved
2021-08-02 22:46RadertifiedResolutionopen => fixed