|
ForumsSega Master System / Mark III / Game GearSG-1000 / SC-3000 / SF-7000 / OMV |
Home - Forums - Games - Scans - Maps - Cheats - Credits Music - Videos - Development - Hacks - Translations - Homebrew |
![]() |
Author | Message |
---|---|
|
Wonder Boy III technical questions
![]() |
I have a number of technical questions for Wonder Boy III. Perhaps someone may be able to assist me.
1. How is the cost of the cure calculated? It seems to depend on a number of factors, including your current form, how many hearts you have, and the location of the hospital? 2. How are the gold drop values calculated for different enemies? Is there some formula? 3. How are the magic/potion/stone/heart piece/hearts drops decided? Is there some formula? 4. The number of hits to defeat a single identical enemy varies, even when using identical form and equipment. What influences this? Is it the attack technique or a random formula? 5. What is the maximum number of gold you can collect? Does the game bug out if you exceed this maximum? I have not had the patience yet to reach any maximum after starting with 983,040 with the code generator. Perhaps there is a fast way to earn gold, or a spot you can grind automatically somehow, or some game genie/PAR cheats that could help? Thanks |
|
![]() ![]() |
|
|
![]() Last edited by Maxim on Fri Nov 08, 2013 8:30 am; edited 1 time in total |
All of these are certainly answerable, even if not in equation form. Most likely some random numbers are involved in the cases where values fluctuate.
Regarding the gold, the password system enforces restrictions on how precisely the value can be encoded, but within the game it is using a regular counter, which probably limits you to 999999. It'd take a long time to collect that much, even if you started at 983040. |
|
![]() ![]() ![]() |
|
|
![]() |
Thank you for your reply. For anyone interested, I have apparently discovered the formula for calculating the cost of the cure. With some exceptions, the formula is ((Current # of hearts [containers] * 5 * Current # of hearts)+Base DP of current form). The exception to this is Piranha-Man, which seems to offer the 2 heart cure for 50 gold instead of 60, even though his base DP is 40. There are likely other exceptions, as I am yet to test every possibility.
Contrary to what I said, all of the hospitals appear to charge the same. Your current level of health or equipment do not appear to be factors either. |
|
![]() ![]() |
|
|
![]() |
Is that based on observing the inputs and output, rather than by looking at the code? The latter will reveal a lot more. For example, there is no such thing as a "base" DP value for the characters, it's just a convention. | |
![]() ![]() ![]() |
|
|
![]() |
This is simply based on observation; I don't know how to look at the code.
I have finally gotten the most gold possible. I can confirm a few things: * The limit is 999,999 * Nothing special happens * Some games have a limit on what a counter will show, but still keep counting beyond what the counter shows. This is NOT the case in this instance. You cannot get more than 999,999 gold. |
|
![]() ![]() |
|
|
![]() |
Hi guys, I took a look at the code and this is what I found out: When entering the hospital, the price for heal gets stored into RAM starting from $d10e. The value that gets written there gets looked up from a table in ROM starting from $1c550. This table consists of 6*8 (transformation * number of heart containers) 2-byte-BCD entries and looks like that: Containers | 1 2 3 4 5 6 7 8 -------------|---------------------------------------------------------- Hu-Man | 60 75 100 135 180 235 300 375 Lizard-Man | 5 20 45 80 125 180 245 320 Mouse-Man | 25 40 65 100 145 200 265 340 Piranha-Man | 45 50 55 60 165 220 285 360 Lion-Man | 55 70 95 130 175 230 295 370 Hawk-Man | 15 30 55 90 135 190 255 330 I've also found out something about the gold drop from monsters: RAM location $c37e holds the number of killed monsters for the current screen +$50. The lower nibble of this value (the number of killed monesters for the current screen) is used to index a table in ROM starting from $5de2. This table consists of entries of 2 bytes: The first byte of each entry is the base amount of money that will drop and the 2nd byte is used as a mask on a value calculated and stored into register A by the following code (sorry too tired to analyze this right now): _LABEL_D36_: push hl push de ld a, ($D0DD) ld e, a ld d, $00 inc a cp $37 jr c, _LABEL_D44_ xor a _LABEL_D44_: ld ($D0DD), a ld a, ($D0DC) inc a cp $37 jr c, _LABEL_D50_ xor a _LABEL_D50_: ld ($D0DC), a ld hl, $D0A5 add a, l ld l, a ld a, $00 adc a, h ld h, a ld a, (hl) ld hl, $D0A5 add hl, de add a, (hl) or a jp p, _LABEL_D67_ inc a _LABEL_D67_: ld (hl), a pop de pop hl ret The first entry of this table is $01 $03. That means the first enemy that is killed on a screen drops 1-4 gold. The second entry is $04 $03 that means the second enemy that is killed drops 4-7 gold and so on. There is an exception to this rule: If the value stored at RAM location $cf66 equals to 7 (an item that increases the amount of gold that is dropped I guess) the index is increased by 2 before indexing the table. |
|
![]() ![]() ![]() |
|
|
![]() |
Thanks for your assistance, Calindro! | |
![]() ![]() |
|
|
![]() Last edited by Maxim on Thu Nov 07, 2013 4:20 pm; edited 1 time in total |
The refill costs match the "inherent" DP of the characters, plus values based on the number of hearts (i.e. the Lizard-Man row) which are vaguely exponential. It'd be good to get it added to http://www.smspower.org/Development/WonderBoyIII-SMS , along with the next thing you figure out :)
The magic byte for the enhanced money drop is probably the lucky sword. |
|
![]() ![]() ![]() |
|
|
![]() |
I'm also keen to find out the CP requirements to unlock all the different equipment in the shops. | |
![]() ![]() |
|
|
![]() |
Those happen to be in the wiki page linked above. | |
![]() ![]() ![]() |
|
|
![]() |
:-/ Sorry, I did not read it thoroughly. I thought those were the CP the item gave to you. And now I realise, only armour grants you CP. | |
![]() ![]() |
|
|
![]() |
New question, does anyone know how the player can still defeat enemies whilst the Thunder Saber is equipped, or the Magical Saber is equipped as Lizard-Man, as you have 0 AP? | |
![]() ![]() |
|
|
![]() |
Can you? You suggested above that there's a random factor, which might make you get non-zero results with a 0 AP weapon. | |
![]() ![]() ![]() |
|
|
![]() |
Yes. Yet every time I attack an enemy when I have 0 AP, I can still defeat them. | |
![]() ![]() |
|
|
Wonder Boy III hacking notes
![]() |
Thinking about getting back into this project of reverse engineering more of Wonder Boy III. Until then dropping off some loose notes + symbol file I took during a hacking session in 2012. I was actually attempting to reverse engineer the level format to hunt for unknown level doors, which I haven't finished. There's very little in the notes, but rather post them than not.
I'd like further to disassemble all the gameplay and namely the controls/physics.. time given. *EDIT* this is pretty much old stuff, I've got more better/infos now will post asap. |
|
![]() ![]() ![]() |
|
|
![]() |
Updated symbol files + some early notes on collision functions.
|
|
![]() ![]() ![]() |
|
|
![]() |
Hey guys. I really appreciate the work you have been doing on this. I am keen to find out how the damage system works (the formula for calculating damage and the defence points of all the enemies and bosses). I could offer a donation or something if that would help. | |
![]() ![]() |
|
|
![]() |
If you can use a cheat finder (like in Meka) to find relevant variables, that might help. | |
![]() ![]() ![]() |
|
|
![]() |
Updated my symbol file with notes. Its very raw and messy.
I think I'll change strategy and start editing a disassembly instead of manually constructing a .SYM file. The way Emulicious detect data and jump table is super useful. |
|
![]() ![]() ![]() |
|
|
![]() |
Minor update.
|
|
![]() ![]() ![]() |
|
|
tigsource blog
![]() |
I'm starting a mini blog here. Not much to get started with:
http://forums.tigsource.com/index.php?topic=50899.0 There's a few reasons why I'm not initially posting it here, you'll find out. But will probably open a thread here. |
|
![]() ![]() ![]() |
|
|
![]() |
This absolutely has my seal of approval!
Any help you need, don't hesitate to ask! |
|
![]() ![]() |
![]() |