News: 11 March 2016 - Forum Rules

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - minucce

Pages: [1] 2 3 4 5 6
1
Personal Projects / Re: Zelda II Redux
« on: December 19, 2021, 05:01:58 pm »
Quote
The 2nd cave you mention, is that one added too by the "Secret.ips" patch? Or is it something else?
I'll include your report for it in the OP as a spoiler tag, for those interested.

It is not part of "secret.ips" but documentation of the original game (what gets replaced by using that secret patch).

If you inspect the patch carefully, it overwrites some bytes when inserting the new secret on Death Mountain. That old location that is replaced appears to be an unused, inaccessible cave. You'll need this cheat code to travel east of Death Mountain, across the ocean to Maze Island (2).

Code: [Select]
00:8716: AC 88 07  LDY $0788 = #$00
 00:8719: D0 04     BNE $871F
 00:871B: C9 0B     CMP #$0B
 00:871D: B0 02     BCS $8721  ==> CLC, RTS
 00:871F: 18        CLC
 00:8720: 60        RTS -----------------------------------------

I have not checked the island except for that one spot. If you enter and leave the temple, you are correctly transported to Maze Island (1). Which has the normal secret cave there with the Quest item.

But Maze Island (2) has the Jar and some guardians protecting it. Try the code,
walk east of the Mountains and you'll see what I speak of.

Kalita asked for my opinion which is why I posted my findings.

2
Personal Projects / Re: Zelda II Redux
« on: December 18, 2021, 07:25:53 pm »
There should be a bunch of png pictures inside (tried a few browsers). I included the direct links also now. :|
(I should do this from now on)


Kalita's spoiler is hidden in white text. Requires you highlight the text to reveal the secret.

3
Personal Projects / Re: Zelda II Redux
« on: December 18, 2021, 03:21:05 pm »
Summary:
It's a bonus feature that adds 1 new cave to the game, making it slightly easier.


Secret patch unlocks this passage in Death Mountain. Normally it does nothing.



It replaces an unused part of the map on Maze Island. You must use a cheat code to access this area. It's technically not the normal Maze Island.



Important note:
You must leave Death Mountain and re-enter to flush the world SRAM cache data, otherwise the secret won't work or trigger wrong cave. Which is why Kalita mentions the "long passage" and the Red Jar.

4
Roughly up-to-date (rebased) with armips master
https://github.com/minucce-yard/Bugs_Bunny_Crazy_Castle_2_GB/raw/9beb86aa4ba2bfac87d21ff8d36b7b00ec28d74e/%40__build/armips.exe


Some code examples of how I used it for Gameboy
https://github.com/minucce-yard/Bugs_Bunny_Crazy_Castle_2_GB/tree/9beb86aa4ba2bfac87d21ff8d36b7b00ec28d74e
https://github.com/minucce-yard/Kirbys_Dream_Land_GB/tree/d92c16b7c4ccd5621753199604d4a64efc10e21a
https://github.com/minucce-yard/Road_Rash_GB/tree/b340609eda4a8e164dafb73529d2a2ebd89038f4

December 15, 2021, 11:41:26 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
OpenMSX is only (?) one who supports memory breakpoints.
https://www.msx.org/forum/msx-talk/openmsx/breakpoint-vram-access

I have little experience with MSX and can't offer guidance.

December 15, 2021, 11:44:19 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
Possible disk tools
https://openmsx.org/manual/diskmanipulator.html (export, import commands)
https://www.msx.org/downloads/dsk-and-xsa-image-utility-linux-and-windows

5
I use armips fork
https://github.com/Prof9/armips/tree/gameboy


Which I think supports full Z80 architecture
https://raw.githubusercontent.com/Prof9/armips/3187f19d73668ae6ffb5ee096cc1cfbb7873f1d5/Tests/Z80/Z80%20Opcodes/Z80%20Opcodes.asm


Be careful of using ".import" for injecting binary files -- I've had bad luck with it and always ".relativeinclude off" to make it consistently work.


You can also create your own "org" macros
https://github.com/minucce-yard/Kirbys_Dream_Land_GB/raw/5879636978eaad1433d7fa3a7631910474a8357f/%40__build/helper.txt


armips does not support fancy xkas/asar macro usage though.

6
Personal Projects / Re: The Minucce Yard
« on: December 15, 2021, 12:31:04 am »
Castlevania Adventure (GB/GBC) has 2 odd bugs

1) Random sprite / garbage flicker is caused by VBlank uploading OAM while sprites are still being written to buffer. So use dma or safety flag to avoid hazard copies.


2) The slowdown. Some poor coder sabotaged the engine.
- Original GB wastes lots of VBlank + 2 scanlines doing nothing. I suppose it's to ("solve") some vram loading corruption (if wait is removed). But not using the timing blocking, it actually moves a lot decent faster and is playable. Check around 0:0af0.

- GBC is also sluggish, which is more suspicious. Around 0:03bc, it waits until LY = $40. 64+ scanlines eaten just to artifically slowdown the GBC turbo mode. Remove that and it does run 60 fps largely. Likely too fast unless engine and animations are re-timed, which admittedly is an interesting idea.


Same can be said for Bugs Bunny 2 DX also, adjusting the internal motions to take advantage of 2x speed (less appearance of rigid frame stutter motion).


Just posting this as I may/not be the one to do any of this. Staying busy with other projects.


Actually I helped someone add unlimited sprite + cpu overclocking + fast bootroms to a well-known GBC emulator. Which got me wondering. I want to add some blue color to King Dedede, but the 10-limit sprite flickering from the overlays would be terribly awful.

But with unlimited sprites, I'm thinking of making a special emulator-only patch. Which would be tempting for a few other existing colorizers also. But it's a fantasy until someone actually cranks the work.

Adding a level select option to KDL config mode isn't a stretch though.

7
Personal Projects / Re: The Minucce Yard
« on: December 05, 2021, 06:54:13 pm »
Quote from: Fray
Meanwhile, I done this for the title screen, I only drew new eyes and changed color on one pixel on her ear:

Page 2. :thumbsup:

8
Personal Projects / Re: The Minucce Yard
« on: December 04, 2021, 03:57:27 pm »
Quote
The patch you provided doesn't work tho, it's the plain Chain Whip IPS by Bogaa.
..
And it still had an awful SPC bug, where all the music was playing with some screeching instruments (almost ear piercing).

Wow. My hearing must be off or I'm confusing all the ROMs. For some reason, I was thinking the music was passable. (Laugh!)


And people don't believe me when I claim how many bugs I end up creating.

Thanks for the correction!

December 04, 2021, 04:03:20 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
You might want to credit Vitor also for the FastRom.. :)

December 04, 2021, 09:04:49 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
My luck ran out for Ys 1 again.






This will definitely take some work. It requires maintaining 2 hud fonts (normal, indoor npc) and possibly 2 alphabet fonts also.

At this point, I may just force switch to MMC3 and fix the Sprite 0 hud tile pixel glitch. Plus expand the rom if needed.


I will update for Datchy compatibility plus other new fixes (minus the black burn). Guess now we know why they left the portraits that way.

December 04, 2021, 11:33:31 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
For those who don't track the RHDN queue.


Bugs Bunny 2 DX Repair - Release 2
https://github.com/minucce-yard/Bugs_Bunny_Crazy_Castle_2_GB/raw/Service_Repair_DX/Bugs%20Bunny%20Crazy%20Castle%202%20DX%20-%20Fluffy%20Repair%20Service%202.zip


Ys Repair - Release 11
https://github.com/minucce-yard/Ys_NES/raw/Service_Repair/Ys%20NES%20-%20Fluffy%20Repair%20Service%20-%2011.zip


-----------------------------------------------

I did not realize that SomeOldGuy made a lot of title edits also, for those who requested the old Ys style.



Nice! Patch included with Release 11 and credit attached. :thumbsup:


Though I didn't notice this tiny pixel error in Datchy's version and original artwork.
(credit to Fray)




Which also didn't occur to me to include in the regular patches. Next time.

December 05, 2021, 05:23:31 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
There is 1 other possible Ys idea - manually flag the indoor portraits. Do a color swap at Sprite 0 hud line, which would be timing risky - there's already too much to swap at h-blank.

And this requires opening up more room in rom. What a fiend! I'll keep poking at it in the meantime.

9
Personal Projects / Re: The Minucce Yard
« on: December 04, 2021, 01:41:24 pm »
At the Yard, nothing is really off-topic here; there are a surprising number of quiet readers.

Anything here is fair - makes the place more interesting to visit. :)

--------------------------------------------------------

Quote
Yeah, almost everything has been compressed using Mobile Golf's compression algorithm, which seems to give impressive results. The game is just 11.5kb at the moment, so I've got enough room for music, new levels and enemies!

Holy! That is amazing statistic. I heard that Phantasy Star Gaiden (GG) has a pretty efficient graphics algorithm (I think it was documented by the PS1 (SMS) team).

----------------------------------------------

Quote
This response works. I'll stick to hardcoded fades then, seems to be the smallest way.

My Kirby generator is $6b30-$6a17 = $119 asm bytes. (8 tables generated = $800 bytes)

(maybe not that big after all but it will eat up cycles if done on-demand; I do at it at boot because it's just 1 palette. I really don't want to hear complaints about making things noticeably slower = loading times, game lag).


I imagine you're going to have a lot of tables for something big like Mega Man World 5 DX. Having everything uncompressed though does make it easier for other hackers though to privately addendum your post-project.

---------------------------------------------------------------

Quote
Indeed, I'm storing all fades (including all white or all black) in different banks but same pointers and offsets, so I just need to select a bank depending on DMG palette registers.

Bugs Bunny 2 DX hacker did the same thing.


DKLDX hacker used wram 1-7. For any bank switch, places new code right afterward.

So it was like this all over the place:
3:D800 = ldh ($70), a
4:D802 = (new code)

I think same with ROM switches too. Drove me crazy trying to debug it for Goomba.

---------------------------------------------------------------

Quote
Thank you! Let me add, you've been lately doing great contributions to GBC colorization hacks with your recent fixes :-)

To be fair, I do small work. Stuff that others ignore and I can stay a blip at the edge of radar.


It took KDLDX hacker 2 weeks to make colorizer, which seems awfully fast. That would take me several years at best, I imagine because investing that amount of effort would turn me off.


And you work on a variety of larger, massive, time-consuming, higher-profile games. But the great stuff takes time; people seem to expect translations and colorizers released at the speed of "instant oatmeal".

(it's why I stopped participating with many non-rh projects even as a consultant, plus other things here and there. Too many greedy expectations)

-------------------------------

Something I eventually want to do is give small reviews for the site. Even for my own stuff later as a post-mortem when they're fresh out of my system.


Right! Back to whatever makes one happy!

10
Personal Projects / Re: The Minucce Yard
« on: December 04, 2021, 08:49:54 am »
Bugs Bunny 2 DX is here
https://github.com/minucce-yard/Bugs_Bunny_Crazy_Castle_2_GB/tree/9beb86aa4ba2bfac87d21ff8d36b7b00ec28d74e/gbc_compatible/fade_screen

https://github.com/minucce-yard/Bugs_Bunny_Crazy_Castle_2_GB/raw/9beb86aa4ba2bfac87d21ff8d36b7b00ec28d74e/gbc_compatible/fade_screen/main.txt


Short story:
There were 6-7 static bgp palettes and ~4 static obj ones. I pre-computed the tables (33%, 66%).

0% and 100% are sent using hacker's upgraded engine (black or white) - basically hard-coded spin loops.


This one is sent during h-blank time; normally it'd make sense during vblank but the engine is setup this way so I went with the flow.

Eas(-ier) version.

---------------------------------------------

And one for Kirby's Dream Land DX.
https://github.com/minucce-yard/Kirbys_Dream_Land_GB/tree/d92c16b7c4ccd5621753199604d4a64efc10e21a/dual_support/recolor_objects/screen_fade

https://github.com/minucce-yard/Kirbys_Dream_Land_GB/raw/d92c16b7c4ccd5621753199604d4a64efc10e21a/dual_support/recolor_objects/screen_fade/tables.txt


Short story:
This one drove me nuts (1st one). You might remember that there's 1 static palette for the whole game, but there's separate patches for LCD pink. And it can fade to black or white.

I didn't want to expand the rom to include the full tables so this is dynamic generated like snes games. And original hacker hard-coded all the colors (in asm) so I read the colors from vram (adds 1-2 frames but most don't care).

Dynamic code is pretty long.


The actual upload is done during vram per old engine.
https://github.com/minucce-yard/Kirbys_Dream_Land_GB/raw/d92c16b7c4ccd5621753199604d4a64efc10e21a/dual_support/recolor_objects/screen_fade/%40__fade.txt

KDLDX has dual mono / color support so you'll notice the branching.


There's also soft-patching color done for various rooms (Lolo, Credits, ??); that's just replacing affected colors per fade frame on-demand.

----------------------------------------

I'm not sure how many ways to do fading but I haven't needed to do a very tight one (fortunately only 2 with some room to spare). You're likely to keep running into more gb faders with your future colorizers. :-]
(which hasn't stopped you from releasing full quality builds!)

December 04, 2021, 10:07:32 am - (Auto Merged - Double Posts are not allowed before 7 days.)
I suppose for a small rom, you could rle pack the graphics and compress the palette data + code. Use the gbc wram 1-7 to your benefit.

11
Personal Projects / Re: The Minucce Yard
« on: December 03, 2021, 08:47:41 pm »
https://github.com/minucce/workbox/raw/c651b0ef8b84fe464fdef549e6d04e5fc3381879/box7/ChainWhipSound.ips
(credit to bogaabogaa)


Source
https://github.com/minucce/workbox/raw/c651b0ef8b84fe464fdef549e6d04e5fc3381879/box7/chain_whip.7z


Summary
1) Add decompressed SPC data to ROM
2) Patch waveform envelope bytes courtesy of bogaabogaa

------------

Bugs Bunny 2 DX

1) Restore warp fade effect


2) Fix black flicker

3) ??

December 03, 2021, 10:32:36 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
Original Bugs Bunny 2 game tries to target 20 fps when inside rooms. Experimental patch to limit gbc mode to 20 fps everywhere.
https://github.com/minucce/workbox/raw/ed56371498896d8b59cb106a4dd0deacd537b9ca/box9/dx_plus.ips

(I might make this a "plus" patch later on, as some may want the boosted 30fps)

vs

12
Personal Projects / Re: The Minucce Yard
« on: December 02, 2021, 07:58:22 pm »
I checked Final Fantasy 6 (3MB HiROM).
- $80:FFD7 = $0C  (4MB).

Super CV4 Uncensored = $0C ($80:FFD7 or $7FD7 raw).

So I guess you just chop the last 1MB and you're done!

---------------

The Kirby report about Kracko rolling the eye in GB Vanilla seems incorrect; couldn't ever get it to happen (always just rumbles).


Which means I should look at Bugs Bunny 2 GB and see what effects are missing.

13
Personal Projects / Re: The Minucce Yard
« on: December 02, 2021, 06:40:05 pm »
Yes, I definitely like it! Like your other work, very nice job.

Not sure what surprise project you'll spring on us next, but I'm glad I could give you some closure.
(and give me another something to look forward to with my 1st playthroughs, eventually)

14
Personal Projects / Re: The Minucce Yard
« on: December 02, 2021, 05:25:50 pm »


Japan tileset (vram 6600-8e00) looks identical to USA tileset (vram 6000-8800). You could copy over the remaining tiles but it would require redoing the tilemap.

I'd say keep working until you're happy; it's only once you get a 1st impression. Although a good 2nd one can change that. :)

15
Personal Projects / Re: The Minucce Yard
« on: December 02, 2021, 01:54:08 pm »
Quote
PS: Btw, I noticed the Uncensored ROM is 4MB, but when actually viewing it in a Hex or graphics editor, it stops having data after the 3MB range, would it possible to trim it down to 3MB instead of 4MB?

I really doubt there's bank mirroring so should be safe to edit the SNES header flag and manually trim the rest.

December 02, 2021, 02:35:54 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
Got a blood hit at d2:a2af ($2922af). 6 tiles wide.

16
Personal Projects / Re: The Minucce Yard
« on: December 01, 2021, 11:13:18 pm »
I didn't want to suggest anything about CV4 or W98 until I was sure I could handle them. ;)


Of which, while you were fixing up CV4 (thank you!), I took care of inserting the W98 credits. They might need re-centering, re-naming or ypos adjusting.


https://github.com/minucce/workbox/raw/b98e4ff265859acb0930ca4488c1cdb648b84ebd/box8/wrecking_credits.ips
(thanks to DarkSamus993 for leaving behind lots of useful documentation)


And the source
https://github.com/minucce/workbox/raw/b98e4ff265859acb0930ca4488c1cdb648b84ebd/box8/credits.7z
(I wrote my own packer as I couldn't locate the original graphics tools)


I did see untranslated tiles. Maybe they're unused?


_____________________________________________


I didn't know a FastROM patch existed either (and almost wasted some time). The website says

Quote
You can play the FastROM version with the Uncensored hack.

Apply the .asm file directly into the Uncensored ROM via Asar.

It's a very destructive process and should always be applied first, before anyone else's work (via ips patch or asm modification).

________________________________________________


Current blood preview



Very nice touchups! I haven't looked at giving some advice yet on the last problems, but you're a capable hacker.

_____________________________________________________


Wrecking Crew 98 is an original engine bug. Exactly as you described, 8-bit opcode being used when it should be 16-bits.

17
Personal Projects / Re: The Minucce Yard
« on: November 30, 2021, 11:28:25 am »
Asar code
https://github.com/minucce/workbox/raw/a5da30090130878d0952fbcd2f290d0572b31ccb/box7/main.txt


This goes on top of "Super Castlevania IV Uncensored"
https://github.com/minucce/workbox/raw/a5da30090130878d0952fbcd2f290d0572b31ccb/box7/blood_drop.ips


Which makes this



The rest of the special effect I'm allowing ShadowOne333 to take care of - sprite repaint, reposition, puddle, misc.

November 30, 2021, 01:25:33 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
Took a small peek recon work of Wrecking Crew 98. It already crashed when pressing button on this cutscene. :huh:




Code: [Select]
$D4/2263 A4 3C       LDY $3C    [$00:0F3C]   A:1945 X:1942 Y:0000 D:0F00 DB:00 S:1FFB P:envmxdIZc HC:0607 VC:232 FC:03 I:00
$D4/2265 B7 0E       LDA [$0E],y[$D4:7E57]   A:1945 X:1942 Y:7E57 D:0F00 DB:00 S:1FFB P:envmxdIzc HC:0653 VC:232 FC:03 I:00
$D4/2267 85 38       STA $38    [$00:0F38]   A:429C X:1942 Y:7E57 D:0F00 DB:00 S:1FFB P:envmxdIzc HC:0695 VC:232 FC:03 I:00
$D4/2269 C8          INY                     A:429C X:1942 Y:7E57 D:0F00 DB:00 S:1FFB P:envmxdIzc HC:0710 VC:232 FC:03 I:00
$D4/226A 84 3C       STY $3C    [$00:0F3C]   A:429C X:1942 Y:7E58 D:0F00 DB:00 S:1FFB P:envmxdIzc HC:0718 VC:232 FC:03 I:00
$D4/226C 64 3A       STZ $3A    [$00:0F3A]   A:429C X:1942 Y:7E58 D:0F00 DB:00 S:1FFB P:envmxdIzc HC:0733 VC:232 FC:03 I:00
$D4/226E 4C C5 21    JMP $21C5  [$D4:21C5]   A:429C X:1942 Y:7E58 D:0F00 DB:00 S:1FFB P:envmxdIzc HC:0748 VC:232 FC:03 I:00
$D4/21C5 A5 38       LDA $38    [$00:0F38]   A:429C X:1942 Y:7E58 D:0F00 DB:00 S:1FFB P:envmxdIzc HC:0756 VC:232 FC:03 I:00
$D4/21C7 29 FF 00    AND #$00FF              A:429C X:1942 Y:7E58 D:0F00 DB:00 S:1FFB P:envmxdIzc HC:0785 VC:232 FC:03 I:00
$D4/21CA AA          TAX                     A:009C X:1942 Y:7E58 D:0F00 DB:00 S:1FFB P:envmxdIzc HC:0793 VC:232 FC:03 I:00
$D4/21CB 7C CE 21    JMP ($21CE,x)[$D4:3C84] A:009C X:009C Y:7E58 D:0F00 DB:00 S:1FFB P:envmxdIzc HC:0801 VC:232 FC:03 I:00
$D4/3C84 FF FF FF FF SBC $FFFFFF,x[$FF:009B] A:009C X:009C Y:7E58 D:0F00 DB:00 S:1FFB P:envmxdIzc HC:0832 VC:232 FC:03 I:00
$D4/3C88 FF FF FF FF SBC $FFFFFF,x[$FF:009B] A:00E3 X:009C Y:7E58 D:0F00 DB:00 S:1FFB P:envmxdIzc HC:0873 VC:232 FC:03 I:00
$D4/3C8C FF FF FF FF SBC $FFFFFF,x[$FF:009B] A:012A X:009C Y:7E58 D:0F00 DB:00 S:1FFB P:envmxdIzc HC:0914 VC:232 FC:03 I:00
$D4/3C90 FF FF FF FF SBC $FFFFFF,x[$FF:009B] A:0171 X:009C Y:7E58 D:0F00 DB:00 S:1FFB P:envmxdIzc HC:0955 VC:232 FC:03 I:00
$D4/3C94 FF FF FF FF SBC $FFFFFF,x[$FF:009B] A:01B8 X:009C Y:7E58 D:0F00 DB:00 S:1FFB P:envmxdIzc HC:0996 VC:232 FC:03 I:00

Does this look familiar? Otherwise I'll dig deeper.

November 30, 2021, 06:42:18 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
Fix:
https://github.com/minucce/workbox/raw/ee6aa1b2ff1eb04dadf3eed5f7762e20a5986579/box8/main.txt
https://github.com/minucce/workbox/raw/ee6aa1b2ff1eb04dadf3eed5f7762e20a5986579/box8/wrecking_fix.ips



Explain:
I wouldn't call this easy. It required comparing 2 very long trace logs for unusual differences.

Code: [Select]
$D4/249A AD A9 18    LDA $18A9  [$00:18A9]   A:0001 X:001C Y:59B4 D:0F00 DB:00 S:1FFB P:envmxdIzc HC:1317 VC:240 FC:25 I:00
$D4/249D D0 0D       BNE $0D    [$24AC]      A:7F01 X:001C Y:59B4 D:0F00 DB:00 S:1FFB P:envmxdIzc HC:1341 VC:240 FC:25 I:00
$D4/24AC 3A          DEC A                   A:7F01 X:001C Y:59B4 D:0F00 DB:00 S:1FFB P:envmxdIzc HC:1355 VC:240 FC:25 I:00
$D4/24AD 0A          ASL A                   A:7F00 X:001C Y:59B4 D:0F00 DB:00 S:1FFB P:envmxdIzc HC:1363 VC:240 FC:25 I:00
$D4/24AE 18          CLC                     A:FE00 X:001C Y:59B4 D:0F00 DB:00 S:1FFB P:eNvmxdIzc HC:0007 VC:241 FC:25 I:00
$D4/24AF 65 3C       ADC $3C    [$00:0F3C]   A:FE00 X:001C Y:59B4 D:0F00 DB:00 S:1FFB P:eNvmxdIzc HC:0015 VC:241 FC:25 I:00
$D4/24B1 A8          TAY                     A:57B4 X:001C Y:59B4 D:0F00 DB:00 S:1FFB P:envmxdIzC HC:0044 VC:241 FC:25 I:00
$D4/24B2 20 B6 FF    JSR $FFB6  [$D4:FFB6]   A:57B4 X:001C Y:57B4 D:0F00 DB:00 S:1FFB P:envmxdIzC HC:0052 VC:241 FC:25 I:00

See value of $18a9. Where did $7f01 come from?

Code: [Select]
$D4/5D23 A2 01       LDX #$01                A:5C06 X:0000 Y:00CC D:0F00 DB:00 S:1FF7 P:envMXdIZC HC:0085 VC:239 FC:13 I:00

$D4/5D25 8E A9 18    STX $18A9  [$00:18A9]   A:5C06 X:0001 Y:00CC D:0F00 DB:00 S:1FF7 P:envMXdIzC HC:0098 VC:239 FC:13 I:00

$D4/5D28 28          PLP                     A:5C06 X:0001 Y:00CC D:0F00 DB:00 S:1FF7 P:envMXdIzC HC:0107 VC:239 FC:13 I:00
$D4/5D29 6B          RTL                     A:5C06 X:0001 Y:00CC D:0F00 DB:00 S:1FF8 P:envmxdIzc HC:0116 VC:239 FC:13 I:00

For those unfamiliar with snes, X can be 8-bit (-X) or 16-bit (-x) (see Processor flags in trace).
- Sound engine uses 8-bit value. Only writes to $18a9.
- Script engine uses 16-bit value. Reads from both $18a9 and $18aa.

Then where did $18aa gets it value?

Code: [Select]
$D4/FFE8 8D A9 18    STA $18A9  [$00:18A9]   A:7FFE X:20F7 Y:7FFE D:0F00 DB:00 S:1FF7 P:envmxdIzC HC:0721 VC:233 FC:04 I:00

Some line break or pause scripting code. So fix sound engine code to write full 16-bit value.

No more crashes on skipping intro. (Spike cutscene untested)

November 30, 2021, 07:23:25 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
On a side-note, there's a free GBC game called "Tobu Tobu Girl DX"
http://tangramgames.dk/tobutobugirldx


which turns out has a SGB + GBC bug in mGBA, but not BGB.
https://github.com/mgba-emu/mgba/issues/2367

vs

which also turns out, that same bug is affecting the Konami GB Collection - Autoboot + SGB compatibility patches.


I consider my work in them complete atm, but you gamers may have to wait awhile until mGBA 0.10.0+.

Because I've been asked a few times privately already, no I'm not releasing them other than to the hacker who originally requested the fixes + improvements. Sorry. You'll just have to wait like (mostly) the rest of us.


When the situation changes, I'll probably let everyone know.

(and no, fixing the games for emulator compatibility would take lots more time than to fix the emulator itself). Please be patient.

November 30, 2021, 07:53:54 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
Tested Wrecking Crew 98 - Spike. Okay. No crash.

18
Personal Projects / Re: The Minucce Yard
« on: November 24, 2021, 09:06:04 pm »
Quote
In that case, would you recommend adding a CLC to clear the carry flag?

I personally checked it. The Carry flag (c=0 or c=1) gets erased later on so does no damage to us. Original main menu routine itself does not rely on (c)arry flag (0 or 1) so that's a double + to ignore it.


And I had no use for (not)carry beyond that simple cmp. No need to worry this time.
(people like me can preserve it for awhile or use it as (rts exit value) so it is something to be mindful of, but not this case)


EDIT:
If it was important, you'd either have to know the correct value (clc, sec) and set it towards the end (latest possible moment). You don't want some other opcode mucking it up too early (Z80 is very good at doing this to you; xor - or - and are not friendly to carry, unlike the 6502).

Or php / plp.
Or regenerate it from whatever (original old code).


Side-note:
A "ld" on Z80 does not affects Z,C flags. Which requires a harmless "or a" to check if it's zero.
(a | a = a)


Honestly I forgot if it's (not) true for the other chips, but that's why you use a debugger to write up quick opcode tests to see what happens.

Give me a week and likely I'll forget these opcode quirks.

19
Personal Projects / Re: The Minucce Yard
« on: November 24, 2021, 07:01:15 pm »
Quote
I didn't check if that STA $16 was part of your Menu tweaks code haha

I was wondering where it came from and dug around. Surprised me too.


You're fix looks good to me! Discarding $54 is safe because code flow shows us:

Code: [Select]
LDA $54 = #$02
CMP #$03
BCC path_2

path_1:
LDA #$00

path_2:
STA $16 = #$02

path_2a:
LDA #$00
sta $13

lda #$ff
sta $526

inc $11
rts

We always hit path_2. And path_2a says to clobber A = #$00, which removes any evidence we loaded $54 (00-FF).

A smart person can object that the (C)arry flag is still in play. Rest of code shows it is not used (follow code after rts).

You're done!

20
Personal Projects / Re: The Minucce Yard
« on: November 24, 2021, 02:17:30 pm »
Long explanation of LDA + BNE - BEQ

EDIT: Keeps eating my code.

Quote
Code: [Select]
LDA #$00 ==> sets Z flag (zero)
BNE no_this_wont_jump
BEQ yes_jump_right_now


Code: [Select]
LDA #$01-FF ==> clears Z flag  (not zero)
BEQ no_this_wont_jump
BNE yes_jump_right_now


Code: [Select]
LDA #80-FF ==> sets N flag  (negative)
BPL no_this_wont_jump
BMI yes_jump_right_now


Code: [Select]
LDA #00-7F ==> clears N flag  (not negative, positive)
BMI no_this_wont_jump
BPL yes_jump_right_now


Code: [Select]
SEC ==> sets C flag  (carry)
LDA #$00-FF ==> no C flag change
BCC no_this_wont_jump_ever__impossible__dead_c0de
BCS yes_jump_right_now


Code: [Select]
CLC ==> clears C flag  (no carry)
LDA #$00-FF ==> no C flag change
BCS no_this_wont_jump_ever__impossible__dead_c0de
BCC yes_jump_right_now


Since others are reading, re-verification of your LSR analysis.

Bit long so bracket tagged.

Quote
Code: [Select]
LDA #$00
LSR  ==> $00 / 2 = $00
BNE not_happening
BEQ yes_we_are_zero


Code: [Select]
LDA #$01
LSR  ==> $01 / 2 = $00
BNE not_happening
BEQ yes_we_are_zero


Code: [Select]
LDA #$02
LSR  ==> $02 / 2 = $01
BEQ not_happening
BNE yes_we_are_non_zero


Code: [Select]
LDA #$03
LSR  ==> $03 / 2 = $01
BEQ not_happening
BNE yes_we_are_non_zero


Code: [Select]
LDA #$04
LSR  ==> $04 / 2 = $02
BEQ not_happening
BNE yes_we_are_non_zero



Right! Only for 00-01 we fall-through to the ORA #$02.

Nothing more to add. :)

----

Quote
If you start your save file and then move one screen above or in any direction, and save in that other screen, the cursor in the File Select defaults to the 3rd save instead. It seems like after saving, RAM address $16 is incremented.

Funny thing is it only seems to occur when you move from the starting screen, if you save at the starting screen itself, it defaults to the 1st save slot when returning to the File Select screen.
It's a weird little thing, I took the liberty of debugging it and it seems like this is the code that's doing that:

Mmm. Have to check my notes. $16 could be a "submode selecter" -- aka what menu phase we're in. It can only get so much done in 1 VBlank so it split itself into mulitple parts.

----

Quote
Thanks for all the help to create the Save Hearts code, Minucce. It certainly opened up the view of some opcodes I didn't fully understand before, and this would help to debug better in the future, and to understand better some routines and opcodes I could use as well!

Curiously other hackers have learned a lot from reading this exercise also. Bonus!

November 24, 2021, 02:58:29 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
Keep tapping $16 writes. Final one says:

Code: [Select]
02:A573: A5 54     LDA $54 = #$02
 02:A575: C9 03     CMP #$03
 02:A577: 90 02     BCC $A57B
 02:A579: A9 00     LDA #$00

 02:A57B: 85 16     STA $16 = #$02
>02:A57D: A9 00     LDA #$00


which turns out to be my code (.. uh-oh!)


Code: [Select]
%org($a573, $02)

main_menu_init_done:
lda $54
cmp #$03
bcc .write

lda #$00 ; default save slot 0


.write:
sta $16


$16 is used as our menu cursor (save 1-3, copy, erase).
(watch hex editor as cursor moves around)


Put a breakpoint on a573.
- Enter copy menu. Quit. $54 = $03 ==> $16 = $00.
- Enter erase menu. Quit. $54 = $04 ==> $16 = $00.
- Copy from 2 to 1. $54 = $00 ==> $16 = $00.
- Copy from 2 to 3. $54 = $02 ==> $16 = $02.

So $54 appears to be a temp var I found and was using. It remembers the last person we selected.

This seems to break on game over.


You have a few quick options:
- Always default to save 1 (makes sense)
- Fix game over to reset to save 1 (or current player). More asm work.
- ..?
- Debug $54 as turns out it's the guilty one (I first thought $16 too)

Pages: [1] 2 3 4 5 6