Points of Required Attention™
Please chime in on a proposed restructuring of the ROM hacking sections.
Views: 88,529,637
Main | FAQ | Uploader | IRC chat | Radio | Memberlist | Active users | Latest posts | Calendar | Stats | Online users | Search 05-04-24 06:32 AM
Guest: Register | Login

Main - Posts by tomaitheous


tomaitheous
Posted on 01-13-14 12:51 AM, in General Megaman Hacking Thread (rev. 2 of 01-13-14 12:52 AM) Link | Quote | ID: 155435


Level: 9

Posts: 1/11
EXP: 2238
Next: 924

Since: 01-13-14
From: a desert-y place

Last post: 3733 days
Last view: 3762 days
So this is thee 8bit Megaman hacking thread? Anyone know of a MM wiki for all this hacking info?

Anyway, I'm currently working on Megaman 1 and Megaman 2. Though Megaman 1 is getting my attention at the moment. If you don't know, I do a handful of 'nes2pce' games. I take NES games and make them run on the PC-Engine (Turbografx in the US). Soome are cart projects and some are CD projects (the system is famous for its CD format). How it works: the original nes code runs on the PCE processor since it's 99% backwards compatible. None of the video/sound/mapper hardware is compatible, so I replace all LDA/STA etc opcodes that read/write ports - with JSRs (since the opcode is the same length). This jumps the processor to some backend code that converts this data into PCE hardware specific stuff. Via backend emulation, I emulate the PPU, APU, and mapper stuff. The PCE's processor runs at 7.16mhz vs NES 1.79mhz. So the game code runs four times as fast (but still timed to 60hz vblank, so the game itself runs at a normal speed). Even with the backend emulation being done on the same processor (processing overhead), the games still run faster than the original nes system. Thus, no slowdown.

From there, I can hack the ever living crap out of the game. I can hack in PCE specific upgrades; more colors(4bpp vs 2bpp), more subpalettes (32 vs 8), larger sprites(16x16/32x32 vs 8x8/8x16), more tile/sprite cells, reduce flicker, upgrade the sound to better PCE PCM or use redbook audio (and ADPCM channel for sampled sound FX). Etc. That kind of stuff.

I have a few intermediate things as well. I've upgraded the PPU emulation; unused bits in the sprite table entries can directly access PCE video related functions. I.e. I can add small upgrades without breaking the original game code too much (I can use it as baby steps).

I currently have Megaman 1 running with PSG sound FX and red book audio tracks (CDDA/CD audio/etc whatever you want to call it).

Anyway, I want to build upon the MM1 game engine. Expand its capabilities, so that I can just bring in other assets from the other Megaman games. One engine to rule them all - basically. And yes, this stuff runs on the real hardware as well (not just emulation).

Also, I'm new here. Hello

____________________
http://pcedev.wordpress.com

tomaitheous
Posted on 01-13-14 02:07 AM, in Otaku no NES cribsheet? Link | Quote | ID: 155437


Level: 9

Posts: 2/11
EXP: 2238
Next: 924

Since: 01-13-14
From: a desert-y place

Last post: 3733 days
Last view: 3762 days
Or should that famicom? Whatever. Y-e-a-r-s back, when I used to do GB/GBC coding - I found some ~very~ handy cribsheets for the system. I've always loved those. I printed out a set on a high res printer and slipped inside some plastic sleeves. I'd keep them next to me when doing GB/GBC stuffs.

A couple of years ago, I decided to do the same for PC-Engine (Turbografx):
http://www.pcedev.net/blog/files/Otaku_no_PCE_cribsheet_page1_v1_0_3.png
http://www.pcedev.net/blog/files/Otaku_no_PCE_cribsheet_page2_0_1_4.png

I was thinking, this would be a good idea for NES as well. The original GBC cribsheets hard more hardware level info as well (regs, timing, quirks, etc). Anyone interested in doing this for NES?

____________________
http://pcedev.wordpress.com

tomaitheous
Posted on 01-13-14 02:13 AM, in General Megaman Hacking Thread (rev. 2 of 01-13-14 04:59 AM) Link | Quote | ID: 155438


Level: 9

Posts: 3/11
EXP: 2238
Next: 924

Since: 01-13-14
From: a desert-y place

Last post: 3733 days
Last view: 3762 days
Posted by Chaobomr
Posted by tomaitheous
So this is thee 8bit Megaman hacking thread? Anyone know of a MM wiki for all this hacking info?

Also, I'm new here. Hello

Let me be the first to welcome you. Second, the best thing I can think of, currently, would be the Megaman pages from datacrystal. You might be able to find something there.


Thanks. Hmm, doesn't seem to have anymore than what I've collected so far - from docs/sites.

Edit: current vid..



____________________
http://pcedev.wordpress.com

tomaitheous
Posted on 01-13-14 05:18 AM, in Otaku no NES cribsheet? Link | Quote | ID: 155441


Level: 9

Posts: 4/11
EXP: 2238
Next: 924

Since: 01-13-14
From: a desert-y place

Last post: 3733 days
Last view: 3762 days
They're PSD files. I made them in Photoshop. But they're still in 'layers' like a PDF would be (I guess). I could never get a correct conversion from psd to pdf (real layered PDF), so I just distribute them as PNG files.

____________________
http://pcedev.wordpress.com

tomaitheous
Posted on 01-14-14 07:55 PM, in The General Project Screenshot/Videos Thread... (rev. 3 of 01-14-14 08:05 PM) Link | Quote | ID: 155449


Level: 9

Posts: 5/11
EXP: 2238
Next: 924

Since: 01-13-14
From: a desert-y place

Last post: 3733 days
Last view: 3762 days


Sprite work on Megaman 1. All Megaman frames are now single 32x32 sprites (SuperPPU mode). Graphic format is now 4bpp (15 colors). I hooked the meta-sprite routine to look for megaman frames, and jumps to an alt code to push sprites onto the sprite stack (sprite table in ram).

Cutman was a pain, since some of his frames reference Megaman's smaller 8x8 sprites. So I had to make a hook to identify his frames, and push alt frames to the sprite stack. While you can't see the difference, his frames are upgrades as well (4bpp, 32x32). Thank fully the rest of the bosses don't do this.

Some pics:






It doesn't break the sprite routine of the game. It pushes the 32x32 single frame sprites onto the game's sprite stack, but they use new bits in the OAM format (formally unused bits):

;*****************************************************************************************************
NES OAM attribyte byte:

76543210
||||||||
||||||++- Palette (4 to 7) of sprite
|||+++--- Extended
||+------ Priority (0: in front of background; 1: behind background)
|+------- Flip sprite horizontally
+-------- Flip sprite vertically

Extended:
D2 = sprite bank select bit
D4-D3: Sprite size
00b = 8x8 NES flipping based on 8x8
00b = 16x16 Native PCE flipping (if sprite bank select bit =1)
01b = 32x16 Native PCE flipping
10b = 16x32 Native PCE flipping
11b = 32x32 Native PCE flipping


;*****************************************************************************************************

"sprite bank select bit" allows you to select a name_table for sprites that's out of reach of the normal nes PPU ( ppu has nametable0 and nametable1, this would be equiv of nametable2). An individual sprite entry can select which bank to reference the sprite # from.

____________________
http://pcedev.wordpress.com

tomaitheous
Posted on 01-15-14 02:33 AM, in General Megaman Hacking Thread (rev. 2 of 01-15-14 02:38 AM) Link | Quote | ID: 155454


Level: 9

Posts: 6/11
EXP: 2238
Next: 924

Since: 01-13-14
From: a desert-y place

Last post: 3733 days
Last view: 3762 days
Posted by Gavzilla1000

Now for a question... what type of program can I use that will allow me to reverse engineer a NES Rom?


Fceux. The current build is 2.2.2. It has both a CDL (Code/Data logger, which is EXTREMELY useful) and a very nice trace logger. Set the trace logger to log to a file, set it to log only new code. Reset the system (via the menu, not closing the emulator) and play the game. You'll have to manually save the CDL file after playing/beating the game. It'll trace all new code as diassembly (along with some register info if you need it). It log all access to ROM as code or data. And for data, it will tell you how that data was access (directly, indirectly, etc).

That's one step. The other step, is to use a debugger and manually step through the code to figure what things are doing. You can alternate between looking at the game in action, in the debugger and looking at the Trace log.


Edit: While you're tracing and logging dissassembly and CDL stuffs, you can use savestates just fine. It won't effect the trace log either, since it only writes new code. CDL stuff doesn't matter because redundant access isn't a problem. Actually, you'll want to use savestates because you're logging the game while playing it - so you want the game to 'do everything possible'; die, fall on spikes, run out of energy, use different weapons, continue, stage select, etc. Fceux has a percentage meter too, so you know how much of the rom is left (unmapped). Slow mo and fast forward also work fine with the trace and cdl logger.

____________________
http://pcedev.wordpress.com

tomaitheous
Posted on 01-16-14 11:51 AM, in My Mapper Conversion Pack v1.2 (Pack Discontinued) Link | Quote | ID: 155462


Level: 9

Posts: 7/11
EXP: 2238
Next: 924

Since: 01-13-14
From: a desert-y place

Last post: 3733 days
Last view: 3762 days
I downloaded this for the Megaman one. I thought you had converted the game to chr-rom as well. Looks like I have some work cut out for me.

____________________
http://pcedev.wordpress.com

tomaitheous
Posted on 01-20-14 09:02 PM, in Capcom Music Engine document + Tutorial Link | Quote | ID: 155494


Level: 9

Posts: 8/11
EXP: 2238
Next: 924

Since: 01-13-14
From: a desert-y place

Last post: 3733 days
Last view: 3762 days
Why not make a simple script compiler for this? I made for Air Zonk sound engine and I'm gonna re-use that source code for MM1/2 NES music engine format.

____________________
http://pcedev.wordpress.com

tomaitheous
Posted on 01-26-14 06:46 AM, in The General Project Screenshot/Videos Thread... Link | Quote | ID: 155536


Level: 9

Posts: 9/11
EXP: 2238
Next: 924

Since: 01-13-14
From: a desert-y place

Last post: 3733 days
Last view: 3762 days


New stuffs

____________________
http://pcedev.wordpress.com

tomaitheous
Posted on 01-30-14 12:59 AM, in Mega Man Upgrade Patch Link | Quote | ID: 155563


Level: 9

Posts: 10/11
EXP: 2238
Next: 924

Since: 01-13-14
From: a desert-y place

Last post: 3733 days
Last view: 3762 days
Yeah, sounds like the mapper isn't initialize on startup (mirror control reg). Relying on a specific state because that's how the emulator setups it up by default, will run you into problems on the real hardware.

____________________
http://pcedev.wordpress.com

tomaitheous
Posted on 02-12-14 07:59 PM, in The General Project Screenshot/Videos Thread... Link | Quote | ID: 155678


Level: 9

Posts: 11/11
EXP: 2238
Next: 924

Since: 01-13-14
From: a desert-y place

Last post: 3733 days
Last view: 3762 days

Converted Cutman's level sprites to 16x16 and large cells + 4bit pixel color per sprite (each sprite has its own unique 16 color palette). Still tweaking the animation of MM player frames.

NARFNra: A lot is planned for this.

____________________
http://pcedev.wordpress.com

Main - Posts by tomaitheous

Acmlmboard 2.1+4δ (2023-01-15)
© 2005-2023 Acmlm, blackhole89, Xkeeper et al.

Page rendered in 0.227 seconds. (330KB of memory used)
MySQL - queries: 31, rows: 54/54, time: 0.221 seconds.