News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

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.


Topics - Ben Boldt

Pages: [1]
1
ROM Hacking Discussion / Zelda II Title Music - VRC7
« on: May 17, 2020, 07:29:57 pm »
Inspired by this youtube video:

https://www.youtube.com/watch?v=wRCjkFQuMKs

I thought I would try my hand at making this happen in a real NES ROM, and maybe even get it hacked into Zelda II.  Staring by looking at Zelda II, it seems that its title screen music engine runs from a call to ROM address $18000 once per frame, and is controlled by RAM address $EA.  Normal game has its own music engine entry point located at $19000.

Infidelity has hacked Zelda II to run on MMC3 already, so it seems following his changes tweaked to VRC7 should be approachable.

Disch has hacked Final Fantasy I with a FANTASTIC Namco-163 music engine.  So to get things started, I decided to write a music engine similar to Disch's for VRC7.  And here we are with a demo:

https://sites.google.com/site/benboldt2/files/zelda_vrc7_v1.zip

I wrote the score using FCEUx, which sounds considerably different than Mesen.  I am thinking Mesen is probably the more accurate one...  So in this case you will want to use FCEUx to listen to it.  I will tweak it to sound best on a real cart eventually, which would likely to match Mesen.

This supports:
 - Similar music score format as Disch's
 - All Pulse, Triangle, and FM channels supported
 - Playing all notes at all octaves, register values in ROM tables
 - score loops and gotos
 - Envelopes for pulse channels via table
 - Arbitrary length envelopes
 - Envelopes can stop or loop back to an arbitrary index
 - Constant volume for pulse and FM channels
 - Vibrato for pulse channels via table of deltas
 - Vibrato pulse period MSB register update using the sweep trick
 - Vibratos can stop or loop back to an arbitrary index
 - FM sustain enable/disable
 - Pulse duty cycle
 - Main program can start and stop song writing to RAM location $EA
 - Snap-to notes, i.e. new frequency but envelope does not restart (not demonstrated, not found anywhere it sounds good)

Not supported yet:
 - Noise channel (at all)
 - Envelopes for FM channels (could be interesting)
 - Vibrato for Triangle or FM channels (needed)
 - Writing to the FM custom patch (needed)
 - Music scores stored on additional ROM pages, will be necessary if doing multiple songs.

I wanted to share and get some feedback.  I am new to writing 6502 ASM, wondering if my code could be more efficient.  It is a lot of code but only small chunks of it should run at a time.  I made a circular buffer for sending FM commands to the VRC7.  I find that simply checking and updating the buffer provides the necessary delays -- that doesn't say much for how efficient it is.  :S

I think it could be interesting to hack Zelda II with this.  Personally, and I don't mean to offend anyone, I found Zelda II to be flop, with the exception of the title screen.  Is anyone else interested in seeing this happen?  At the very least, I think this is becoming a good FM engine.

2
ROM Hacking Discussion / FCEUX Text Hooker, .tht table format
« on: February 02, 2020, 03:49:29 pm »
I was playing with Text Hooker for the first time, trying to get it to make some sense of the game "Jarinko Chie - Bakudan Musume no Shiawase Sagashi".  I have not used Text Hooker before so I googled info on it, and it seems the first thing I have to do is build a THT table.  From what I gather, this is a text file, where each line is like this:

00=A
01=B
02=C
etc.

The first 2 digits are a hex code corresponding to the NES PPU's background pattern table, which would correspond to the right side of the window in FCEUX's PPU Viewer.  So, I built up a text file with all 256 hex codes, and filled in the corresponding Japanese Hiragana and Katakana characters, the special tenten and maru keywords per FCEUX help docs, and backfilling the graphics and ones I didn't know with @ symbols:

Code: [Select]
00=
01=あ
02=い
03=う
04=え
05=お
06=か
07=き
08=く
09=け
0A=こ
0B=さ
0C=し
0D=す
0E=せ
0F=そ
10=た
11=ち
12=つ
13=て
14=と
15=な
16=に
17=ぬ
18=ね
19=の
1A=は
1B=ひ
1C=ふ
1D=へ
1E=ほ
1F=ま
20=み
21=む
22=め
23=も
24=や
25=ゆ
26=よ
27=ら
28=り
29=る
2A=れ
2B=ろ
2C=わ
2D=を
2E=ん
2F=ア
30=イ
31=ウ
32=エ
33=オ
34=カ
35=キ
36=ク
37=ケ
38=コ
39=サ
3A=シ
3B=ス
3C=セ
3D=ソ
3E=タ
3F=チ
40=ツ
41=テ
42=ト
43=ナ
44=ニ
45=ヌ
46=ネ
47=ノ
48=ハ
49=ヒ
4A=フ
4B=ヘ
4C=ホ
4D=マ
4E=ミ
4F=ム
50=メ
51=モ
52=ヤ
53=ユ
54=ヨ
55=ラ
56=リ
57=ル
58=レ
59=ロ
5A=ワ
5B=1
5C=ン
5D=@
5E=@
5F=@
60=@
61=@
62=@
63=@
64=@
65=tenten
66=maru
67=2
68=@
69=?
6A=!
6B=3
6C=.
6D=@
6E=@
6F=@
70=@
71=@
72=@
73=@
74=@
75=@
76=@
77=@
78=8
79=@
7A=@
7B=@
7C=@
7D=@
7E=@
7F=@
80=@
81=@
82=@
83=@
84=@
85=@
86=@
87=@
88=@
89=@
8A=@
8B=@
8C=@
8D=@
8E=@
8F=@
90=@
91=@
92=@
93=@
94=@
95=@
96=@
97=@
98=@
99=@
9A=@
9B=@
9C=@
9D=@
9E=@
9F=@
A0=@
A1=@
A2=@
A3=@
A4=@
A5=@
A6=@
A7=@
A8=@
A9=@
AA=@
AB=@
AC=@
AD=@
AE=@
AF=@
B0=@
B1=@
B2=@
B3=@
B4=@
B5=@
B6=@
B7=@
B8=@
B9=@
BA=@
BB=@
BC=@
BD=@
BE=@
BF=@
C0=@
C1=@
C2=@
C3=@
C4=@
C5=@
C6=@
C7=@
C8=@
C9=@
CA=@
CB=@
CC=@
CD=@
CE=@
CF=@
D0=@
D1=@
D2=@
D3=@
D4=@
D5=@
D6=@
D7=@
D8=@
D9=@
DA=@
DB=@
DC=@
DD=@
DE=@
DF=@
E0=@
E1=@
E2=@
E3=@
E4=@
E5=@
E6=@
E7=@
E8=@
E9=@
EA=@
EB=@
EC=@
ED=@
EE=@
EF=@
F0=@
F1=@
F2=@
F3=@
F4=@
F5=@
F6=@
F7=@
F8=@
F9=@
FA=@
FB=@
FC=@
FD=@
FE=@
FF=@

I saved this with Notepad++ with UTF-8 encoding and when I open it in FCEUX, make a selection, and press snap, I get garbage in the "Hooked Text" window.  Going back to Notepad++ and converting it to ANSI encoding, the garbage then corresponds to the ANSI shown in Notepad++.  I also tried saving another .THT file using Japanese Shift-JIS encoding in Notepad++, and it just has a different garbage.

Does anyone know how to correctly encode FCEUX .THT files for Japanese?  Or should I be using something other than FCEUX for this?

3
Personal Projects / Kung Fu 50x: Fight Sylvia!
« on: April 01, 2018, 09:49:06 pm »
Legend has is that you get to fight Sylvia when you beat the game 50 times.  Not true, until now!

Basically, the game is completely normal for the first 49 plays.  The 50th play (when counter reads '49') is different, it is based on "Sylvia Saves Thomas" hack by Megafield64.  I made some slight alterations to indicate some marital problems, and an improved hairstyle for our protagonist. ;)

Then the 51st play (when counter reads '50'), you are Thomas again.  The plan is to graphics-hack swapping Mr.X with Sylvia (I would love some help with that), and you save Mr. X from Sylvia, revealing Mr.X was his true love all along, etc.  It is completely functional now, and just needs graphics for fighting Sylvia instead of Mr.X, and saving Mr. X instead of Sylvia.  This is maybe somewhat comical in a way, but it is not meant to be homophobic.  Not sure how this board is what that; let's treat it as light-hearted please.


Here is how I did the hack:

I took the original Kung Fu (Mapper 0) and made it into Mapper 66 like Super Mario Bros./Duck Hunt.  This allowed me to quadruple the PRG and CHR space.  I placed copies of Kung Fu PRG into slots 0, 1, and 2, and copies of CHR into slots 0, 1, and 2.  Since Kung Fu is absolutely packed full, I moved some initialization code to PRG page 3 to free up some space in each of the other slots.  Then in that free space in each game, I detect the number of plays and do PRG/CHR swap based on <49, =49, and >49.  After switching, it just carries right along at the same spot in the new page.  It is functioning like a multicart in a way.  Also, I paid special attention to the unknown initial state of the 74_161 if this is to be put onto a real cartridge.  The reset vector should function properly on each page and ultimately get redirected to page 0.

Because of this shotgun approach (having 3 whole copies of the game), each version can be hacked freely, independently.  So I am able to edit directly for separate graphics and messages in each one for example.

Here is the ROM file layout:

$00000:0000F iNES header

$00010:0800F PRG 0 - Vanilla Kung Fu
$08010:1000F PRG 1 - Marital Problems (based on Megafield64)
$10010:1800F PRG 2 - Fight Sylvia, save Mr.X
$18010:2000F PRG 3 - Offload some initialization code

$20010:2200F CHR 0 - Vanilla Kung Fu
$22010:2400F CHR 1 - Marital Problems (based on Megafield64)
$24010:2600F CHR 2 - Fight Sylvia (needs more work)
$26010:2800F CHR 3 - Not used.

Please try it and let me know if you find any issues.

Player 1 & 2 defeat counters are located at $56 & $57, which get loaded into $5E for whoever is playing at the time.  Setting to $31(49) causes the game to go into marital problems mode, $32(50) or higher is fight Sylvia mode.  This is checked at the beginning of each level.  I imagine beating the game 256 times likely rolls back to 0.  ::)

If anyone would like to lend a hand with graphics, especially Megafield64 if you're out there, that would be greatly appreciated.  Also, upgrading the beat game counter to 2-digit decade would be amazing if anyone is up for a challenge.  I looked into this but am not very familiar with the PPU, so I was not able to make any progress on it yet.  There are still 80 bytes free PRG space available in each game at ROM file address $2DB:2DA (+ $8000 * x), which can be expanded more as needed.

BPS file:
https://sites.google.com/site/benboldt2/files/Kung%20Fu%2050x.zip

Play 49:




Play 50 (Sylvia and Mr.X graphics still not changed):





4
Gaming Discussion / Left Scrollable Super Mario Bros. 1?
« on: November 02, 2017, 07:37:41 pm »
I am just curious, has anyone ever produced a left-scrollable version of Super Mario Bros.?  For example, hacking SMB3 with levels and graphics from SMB1, giving it the ability to scroll left?  I kind of dreamed of finding the Game Genie code for that when I was a kid.  hahaha

5
Help Wanted Ads / Trouble with Final Fantasy Namcot-163 opening theme
« on: September 06, 2017, 01:56:36 am »
Disch made an amazing Namcot-163 hack of Final Fantasy, where it uses 4 extra sound channels from Namco-163!

Original thread:
http://www.romhacking.net/forum/index.php?topic=21907

Unfortunately, the opening theme does not play properly when you cross the bridge.  The music just plays a note or two and then freezes...  The game is still runs normally, and when you exit the bridge scene, sound is back to normal.  It seems isolated to this scene, and no doubt the ending scene (though I have not tried that one.)

Amazingly, with my crude hacking skills, I was able to make the song play but with glitches on the pulse channels and slow downs during the visual effects on the screen:

https://youtu.be/iEatzvHF_VA

Disch has real life to attend to and understandably can't spend the time to figure this out.  Is there anyone that could take a look at this and see if it can be improved?  He generously provided the source code, and said it is okay to share it:

https://www.dropbox.com/s/mwyp2kbw2hyub9r/ff1_namco_src.zip?dl=0


In my hacked version, the music when you first start the game is missing due to a building mistake I made; just so you know that's not what is broken.  You can use the following Game Genie codes to easily beat garland and cross the bridge:

Fighter:
NYKLPALX    Start with 255 HP.
NYKLYEZE    Start with 255 Damage.

And then make a team of 4 fighters.

Here is the file I hacked:
https://sites.google.com/site/benboldt2/files/ff_namcot_opening_theme_glitch.zip?attredirects=0&d=1

I am not sure if it is worth it to continue development in this condition!  If anyone can help I would really appreciate it.

6
ROM Hacking Discussion / Are there any Namco-163 hacks out there?
« on: May 14, 2016, 12:00:24 pm »
Has anyone ever seen a hack that utilizes Namco-163 expansion audio?  As much as I search, I have never found such a hack.  I have found quite a few famitracker tunes that are super cool versions of music from games, but I have never seen these inserted into an actual ROM and playable.

I understand that there are 2 obstacles with this:
1.  Make the game's memory mapping work on Namco-163
2.  Change the game's music engine to support Namco-163 expansion audio

Has nobody ever done this successfully?  I think we could open some doors to different sorts of audio hacks if we had at least one example, even if it's a simple one, for example starting from a mapper 0 game to minimize #1 above.

7
Newcomer's Board / Can\'t log in to wiki
« on: April 23, 2012, 03:22:42 pm »
I just registered here and I can log in to the forum fine but not the wiki.  I want to create a new page for the BS Zelda RAM map, I found some bytes.  These are just a copy/paste of my notes, they are not cleaned up or in a nice wiki format.

I tried to figure out a RAM address that could get you the red boomerang at all times, but it appears that will need to be a ROM hack.

All addresses and values are in HEX.

6DDC   Health

73FE   ?
73FF   

741E   ?
741F   ?
7420   ?
7421   Boomerang 00=none, 01=normal, 02=blue, FF=red
   (red still depends on minute between 45 and 55)
7422   Bomb Count
7423   Arrow 00=none, 01=wooden, 02=silver
7424   Candle 00=none, 01=blue, 02=red
7425   Whistle 00=none, 01=enabled
7426   Food 00=none, 01=enabled
7427   Medicine 00=none, 01=blue, 02=red
7428   Magic Rod 00=none, 01=enabled
7429   Raft 00=none, 01=enabled
742A   Book of Magic 00=none, 01=enabled
742B   Ring 00=none, 01=blue, 02=red
742C   Ladder 00=none, 01=enabled
742D   ?
742E   Power Bracelet 00=none, 01=enabled
742F   Old Lady Letter 00=none, 01=enabled
7430   Dungeon Compass bitfield
   bit 7 (MSB) = level 1 ... bit 0 = level 8
7431   ?
7432   Dungeon Map bitfield
   bit 7 (MSB) = level 1 ... bit 0 = level 8
7433   ?
7434   ?
7435   ?
7436   Rupee LSB
7437   Rupee MSB
7438   Key Count
7439   Triforce Piece bitfield
   bit 0 (LSB) = piece 8 ... bit 7 = piece 1
743A   Sword 00=none, 01=wooden, 02=white, 03=magic
743B   ?
743C   Bow 00=none, 01=enabled

3:45   Red Boomerang
3:50   Lightning Storm
3:55   End of Red Boomerang


April 23, 2012, 03:24:27 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
Oh never mind I was using the wrong user name.

Pages: [1]