News:

11 March 2016 - Forum Rules

Main Menu

Megaman 1 and 2 for PC-Engine upgrade/hack

Started by tomaitheous, March 05, 2012, 04:34:49 PM

Previous topic - Next topic

tomaitheous

I'm creating a project thread just for this game. Instead of the other thread that's about all NES conversions.

Anyway, this thread is about upgrading Megaman 1 for the PCE with new sprites and tile abilities, adpcm sound FX (and psg as well), and CDDA or new PCEPSG sound track. Basically a hack for the hack ;)

Please note, I'm looking for people that have experience with hacking Megaman on the NES. Low level hacking experience (changing code and such). I've seen some impressive hack work done out there for MM1 and I'd like to add some features to MM1 as well. Two completely new bosses would be nice (maybe like the Powered Up ones, I dunno). If you're interested, then lets talk. Or if you know someone with the skills, send them over here or to my blog (here would probably be better). You/they/him/her don't need to have PCE knowledge or experience. I'll handle that side of things. For them, it would be no different than hacking the original NES rom.

I don't need pixel artists just yet, I'll use place holder graphics to test out the upgraded functions meantime. I'll put out a want ad for that once I'm ready for that. I'm also gonna modify an existing sound engine for the PCE and use it for PCEPSG. So I'll be looking for some chiptune talent to make PCEPSG music remixes. Yeah, CDDA (red book) will be an option - but I happen to like the PCE sound chip and would to do something with it for this game.

The game's primary platform is SuperCD. I do plan to make a hucard version (though it'll lack ADPCM and red book upgrades) for the mere fact that I'm going to be making some of my own hucards by hand/DIY project. I've love to have a hucard of the upgraded game for myself.

The actual WIP stuff so far:

- New title intro sequence (animation and such)
- Easy mode for wusses ;)
- save feature
- 16 color sprites and tile
- 16x16,32x16,32x32 sprite cell sizes
- extended palette num to 8 for sprites
- ADPCM sound fx
- red book audio


It might be hard to notice at first, but the debugger pic there is showing off the 16x16,32x16, 32x32 sprite hacking that I've already started doing (old pic yeah, I'm too lazy to post something more recent).
I hacked the meta sprite table to just reference a single 32x32 sprite frame in memory. It means the sprite work is no longer limited to 8x8 cells of the original meta table.

Edit: blog @ http://pcedev.wordpress.com

Bregalad

The project sounds cool, but I don't have a PCE and I don't even know anything about the hardware so I'm afraid I can't be of much help.
Is there any good PCE debuggers (I means emulators with advanced debug options) around ? I remember that the set of PCE emulators was extremely limited, none of them ran really well on my computer and this made me loss the interest in this platform.

It sounds like doing a hucard "by hand" would not be easy. They're basically PCBs with epoxy blobs on them, doing PCBs is not hard but epoxy blobs, it's another story.

tomaitheous

QuoteThe project sounds cool, but I don't have a PCE and I don't even know anything about the hardware so I'm afraid I can't be of much help.
Is there any good PCE debuggers (I means emulators with advanced debug options) around ? I remember that the set of PCE emulators was extremely limited, none of them ran really well on my computer and this made me loss the interest in this platform.

The current WIP of mednafen is the only real debugger for the PCE. It takes a little bit to get used to the single window overlay (you have to switch through windows/overlay) as opposed to multiple window layout, but it's a pretty powerful debugger once you get past that. That, and mednafen is the most accurate emulator so far for PCE/TG16. I'm dev'ing for the real console, so that means a lot to me. I don't know what the requirements are for it, but I'm sure it's higher than some of the other PCE emulators like Magic Engine or such.

As far as a PCE, the CD base systems is where the worth of the system as... and unfortunately it gets expensive for CD setups. If you interested, I have a spare TG16. The HuC6280 is just a modified R65C02S, so you'd feel right at home with having 6502 experience. The single BG layer makes for some nice challenges IMO, similar to the NES.

Yeah, the original hucards used gloptop roms:


But I was looking into using tsop flash rom. From what I've seen for measurements of TSOP 28F series, they're supposedly 1mm in height. That's 0.040 inches. And from what I measure, it looks like I have 0.050 room. If I need more room than that (thinner bottom), I'll have to go the Arcade Card (hucard) route/method and just have a complete whole through the plastic but with a thin metal cap to cover it up on the bottom. Like so:

Except I wouldn't need such a long PCB.

curses

BizHawk is supposed to have debugging tools. More on it here.

LostTemplar

Awesome project. I love Mega Man and while I haven't played much PCE, I like the distinctive look of the graphics.

Totally unrelated, but since emulators were mentioned, are there any games known to have compatibility issues?

Bregalad

Medfaden is probably the best PCE Emulator, it's just that for some unknown reason it completely refuses to run on my PC, not even an error message or anything, it just does nothing when I try to launch it.

BizHawk looks good but it definitely don't have any debugging features. Viewing RAM is not enough for a debugging feature, I mean you should at least be able to set breakpoints and to execute step-by-step code to claim to have any "debugging features".
How many emulators claims to have debugging features because they just allow you to see the palette or something almost completely useless like that ?

Azkadellia

Quote from: Bregalad on March 06, 2012, 04:58:11 PM
Medfaden is probably the best PCE Emulator, it's just that for some unknown reason it completely refuses to run on my PC, not even an error message or anything, it just does nothing when I try to launch it.

Mednafen is a good emulator, but it uses the archaic commandline (no GUI). Best suggestion; use MedGUI or a bunch of .bat files.
Current Projects: On hold indefinitely.
I do the Twitter thing now: https://twitter.com/MistressSaeko (expect lots of game streaming announcements)
Mistress of the RHDN Discord server.

LostTemplar

Quote from: Bregalad on March 06, 2012, 04:58:11 PM
How many emulators claims to have debugging features because they just allow you to see the palette or something almost completely useless like that ?

Yeah, I've noticed that, too. And while I do like C#/.Net for GUI work and stuff like that, writing an emulator in it seems a bit strange.

Azkadellia

Current Projects: On hold indefinitely.
I do the Twitter thing now: https://twitter.com/MistressSaeko (expect lots of game streaming announcements)
Mistress of the RHDN Discord server.

tomaitheous

Quote from: Bregalad on March 06, 2012, 04:58:11 PM
Medfaden is probably the best PCE Emulator, it's just that for some unknown reason it completely refuses to run on my PC, not even an error message or anything, it just does nothing when I try to launch it.

For hucard roms or for CD ISO games? For roms, I just associate the file extension in windows to the exe file. Cutting out the need for command line options. Of course I have everything setup in the CFG file for filtering and scanlines too.
For CD games, you need to setup the command line just once, or at least manually edit the CFG once - for the BIOS rom to run them. Then, do like with PCE files and just associate CUE files with the mednafen.exe file in windows. Instant launch when you double click the CUE file. If the emulator itself has a problem trying to load/run a game, it outputs a std.txt or err.txt or some file like that. And it's usually placed in the directory of the file you're trying to run (assuming you've setup the EXE as an association file type for the rom).

Yeah, that emulator Bizhawk looks like it's for TAS type stuff - not a debugger. I recognize one authors on the project too, that hangs out in the mednafen channel.

A little demo of the sprite work:
http://www.youtube.com/watch?v=f196pdbE0Ec

I originally was hacking the meta tile related stuff for the sprites, but I've decided that I'm just gonna put a hook in there instead and read from my own tables - to write to $200 for sprite DMA (NES side).


Bregalad

QuoteFor hucard roms or for CD ISO games?
Neither : When I click on the exe, nothing happens. I think I've also tried to do it from the command line and nothing happened either. I haven't tried this for a while and I don't think I've tried to attach file extensions, so I should maybe try again.

tomaitheous

Quote from: Bregalad on March 07, 2012, 07:01:26 AM
Neither : When I click on the exe, nothing happens. I think I've also tried to do it from the command line and nothing happened either. I haven't tried this for a while and I don't think I've tried to attach file extensions, so I should maybe try again.

Ahh, yeah. Running without any parameters on the command line (or having windows run it with file associated with it), it'll do nothing, Like someone else mentioned, there is a GUI frontend program for it, but to be honest it's pretty minimal and once you setup the file extension to be associated with the mednafen executable - it's not even needed. So yeah; just right click the PCE file and clock 'open with', then select browse and find the mednafen.exe file. If you never associated a project for the file type windows, then 'open with' won't show up as an option. In that case, just double click the file and choose 'select from program list', then proceed to browse for file the mednafen.exe and choose it.

Most stuff can be setup in the .CFG, but gamepad setup can be done in the emulator itself once it's running a rom. Just press F1 for directions once it's up and running. Alt+d gets you into the debugger and alt+1, 2,3, or 4 switches the viewable window/overlay (there's a document explaining all the debugger options and such).

Validus

Cant wait to play this! There are so many great NES action games that would just be SPECTACULAR on the PC EngineFX

the Draculas, 1 and 3 mainly. Contra Hard Corps? the one that isn Super C. Ninja Gaiden 2 and 3. PowerBlade, Strider

Graphics from that first pic are looking SWEET! keep up the PCFX love!! My all time favorite system!!

MottZilla

He did not ever say the PCEFX. Just the regular old PC-Engine.

Hildebrande Glossop

damn, that demo already puts wily wars to shame :woot!:
PC engine love....feels real good...

tomaitheous

#16
I was getting a little dismayed by the lack of doc/info on the game. I mean, the partial disassembly doc is great (and that other one too that gives offsets to specific data) - but they're not complete. I had found the routine that takes the map meta-tile and gets the real tiles from - but not the upper level format. Thanks to Rock and Roll Megaman editor by Dan, I was able to binary compare mods and fill in the missing gaps of info I needed. So I think I have everything I need to hack the tilemap format to extend the total tiles from 256 (8x8) to 768. I should be able to run a hook that'll access alternate room format data to add extended attribute functions (upper tiles, higher number BG subpalette, etc) as it decodes. Hmm.. gonna see if I can get rid of the NES attribute block with something cleaner. Just gotta figure out how I'm gonna break it...

Edit:

Ok, I think I got this figured out. The tilemap routine writes a packet of data to a buffer. The buffer contains X number of packets to update vram with during vblank. Format: ppu address, tilemap data (16bytes), ppu attribute address, attribute byte. The hook reads an alt room data that shadows the current selected room, and if the alt room data points to extended tiles and/or attribute data - it alters the ppu *addresses* in the packet. I will use invalid ppu address that the backend emulation code would read and alter the tilemap and attribute data on the fly as it converts it to native PCE tilemap data. So for example: address $279f would become $479f or 679f etc.

tomaitheous

Megaman 2 is up and running (and beatable).


kingofcrusher

That is amazing, Mega Man 2 is by far the greatest entry in the series, can't wait to eventually play it on my Duo. Wily Wars was so shit with that delay between control input and action. Also excited about the PCE version of the soundtrack, I love the PCE's sound chip and can't wait to hear Wily's Theme pumped out through it!