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

Author Topic: Megaman and other NES hacks for PCE  (Read 47506 times)

flamepanther

  • Jr. Member
  • **
  • Posts: 38
    • View Profile
Re: Megaman and other NES hacks for PCE
« Reply #60 on: February 21, 2011, 07:44:19 pm »
The PCE version is using 16x16 size sprite cells, you just can't see it because the emulation side it only updating an 8x8 area inside the 16x16 cell. It's wasting vram. If you can trap the routine that calls the vram(tiles) update request, you could use an identification process and load custom 4bit sprite data instead. You'd also have to hack the sprite matrix routine that's responsible for making the Meta sprites you see on the screen.
if somebody can hack that in there, I'd be eager to start working on enhanced sprites and pallets.  The coding to make it all possible would be quite beyond me though. I tried learning to program once, and failed to master even BASIC.  :-[

tomaitheous

  • Hero Member
  • *****
  • Posts: 543
    • View Profile
    • PC Engine Dev
Re: Megaman and other NES hacks for PCE
« Reply #61 on: February 21, 2011, 08:32:59 pm »
Yeah, this stuff is fairly advanced. I was looking at this rom today (the straight NES one) and I realized (or had forgotten) that the graphics are uncompressed. For some reason, I though they were compressed. Maybe it's just the tilemaps that are compressed.

 Anyway, that's good news. Because I can visually identify the sprite groups and BG tile groups with an editor. Writing a hook routine to monitor these areas will be simpler than I had originally thought. If I can figured out the metatile table for the sprites, and animation tables, I could reduce the sprite frames back down to 16x16 condensed and reclaim that vram space (for more sprite frames and more tiles to access than the NES limits per level).

 Are there no veteran MM1 asm hackers out there that would like to chime in?

flamepanther

  • Jr. Member
  • **
  • Posts: 38
    • View Profile
Re: Megaman and other NES hacks for PCE
« Reply #62 on: February 21, 2011, 09:40:44 pm »
Yeah, this stuff is fairly advanced. I was looking at this rom today (the straight NES one) and I realized (or had forgotten) that the graphics are uncompressed. For some reason, I though they were compressed. Maybe it's just the tilemaps that are compressed.
More good news: Since I'm not a ROM hacker so much as I'm an artist who has dabbled in ROM hacking, poking around in NES CHR data is the area where I have the most experience... and I'm pretty confident that the games you've ported all use uncompressed tiles.  To my understanding, compressed tiles are pretty rare on the NES, outside of a few RPGs.  Guessing from what you've said, most other games should be no more difficult to deal with.  :thumbsup:

Hamtaro126

  • Full Member
  • ***
  • Posts: 174
  • R.I.P. 2006-2012
    • View Profile
Re: Megaman and other NES hacks for PCE
« Reply #63 on: February 21, 2011, 11:17:58 pm »
Is there any info on CNROM, MMC1, and limited MMC3/FME7 mapper conversions with CHR-ROM yet?

Like to see that if so, Otherwise good luck,

Reason for Asking: I tried redoing your NES code in SNES ASM, But the comparsion with 65816 instructions (like used in your PCE version of $2002) needed have no equivelent!
(Ban is Repealed because of refusal to accept action. Making this major problem worse, So if no-one tempbans me, I WILL NOT COME BACK PERMANENTLY)

Erase this when you are ready to act like a MAN!!!

tomaitheous

  • Hero Member
  • *****
  • Posts: 543
    • View Profile
    • PC Engine Dev
Re: Megaman and other NES hacks for PCE
« Reply #64 on: February 25, 2011, 06:24:11 pm »
Is there any info on CNROM, MMC1, and limited MMC3/FME7 mapper conversions with CHR-ROM yet?

 You mean, have I done anything with them? I did one MMC1 game, but it was originally UNROM. All other conversions I've done are UNROM so far.

Like to see that if so, Otherwise good luck,

Quote
Reason for Asking: I tried redoing your NES code in SNES ASM, But the comparsion with 65816 instructions (like used in your PCE version of $2002) needed have no equivelent!

 The instructions themselves could probably be converted over to 65816 itself. But that's not the problem. The problems is the system architecture. You'd pretty much have to re-write the video and audio emulation core for the SNES, among other things. Though you could probably use some of the same techniques. I dunno. My emulation core is writing to VRAM during active display. I'm not sure that kind of approach is gonna work out on the SNES. You might have to do something like a 1 frame base delay or such, to keep things/updates in sync (NES is updating vram during vblank, the realtime conversion/emulation to SNES side is going to take it out of vblank range. So you could just convert it to ram and then DMA it on the next frame. That complicates things though). That, or completely re-write all the tile/sprite/map routines to be native SNES format. That also means it'll be game specific. I purposely didn't take that approach, so that I could reuse my emulation cores for other games and gettings results very quickly (getting the game up and running within a few days work).



Update:

 I've traced, RE'd, and documented quite a bit of MM object/tile/map routines. I started adding a few hooks. Bisqwit's doc helped quite a bit, but it wasn't easy enough just to follow along by itself. I used it as a reference point to look at the code running in the game. But it was a big help. Many thanks to him and his doc.

 Update:
 
 After going back and forth about how to implement the sprite upgrades, I've decided to do it on an emulation level. That is to say, I upgraded the original NES OAM table since there was three unused bits:
Code: [Select]
    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 = High palette bit
                  D4-D3: Sprite size
                        00b = 8x8   NES flipping based on 8x8
                        00b = 16x16 Native PCE flipping  (if upper palette bit set)
                        01b = 32x16 Native PCE flipping
                        10b = 16x32 Native PCE flipping
                        11b = 32x32 Native PCE flipping

 So now normal NES sprite behavior can co-exist along side extended sprites. This also means you can show more sprites on screen since the OAM table will be more efficient with the new sprite sizes.  There's also 8 subpalettes now instead of 4. Using any of the upper subpalette automatically puts you in extended sprite mode (i.e. no 8x8 cell size relative to flipping X/Y. If the sprite cell is left as 8x8, it'll be flipped as if it was in a 16x16 cell - whether you see the extra data or not). You don't need to use the extended sprite cell format to use 4bit pixel mode either.

 As for 4bit sprite cells (15colors VS 3colors), that support was always there just no NES equiv function. I'll make a pseudo sprite DMA command for transferring sprite pixel data to tile banks (for both 8x8 in 16 colors and native 16x16 cells in 16color format).

 Basically, making it so that you don't need to know any PCE hardware. Just hack it as if it were an normal NES game, just a with extended functions and graphics.
« Last Edit: February 26, 2011, 11:08:48 pm by tomaitheous »

Piotyr

  • Hero Member
  • *****
  • Posts: 1477
  • I'm useful, honest!
    • View Profile
Re: Megaman and other NES hacks for PCE
« Reply #65 on: February 27, 2011, 03:34:38 am »
Can I make a small request? Super Dodge ball? I would love to see that on nes even without many enhancements.
Please don't take offense I really have no right to ask but it would be great.

KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 6838
  • *sigh* A changed avatar. Big deal.
    • View Profile
Re: Megaman and other NES hacks for PCE
« Reply #66 on: February 27, 2011, 11:02:51 am »
Hack Super Dodge Ball TO PCE? That game was ported officially, Nekketsu Koukou Dodgeball Bu PC Bengai Hen.
"My watch says 30 chickens" Google, 2018

flamepanther

  • Jr. Member
  • **
  • Posts: 38
    • View Profile
Re: Megaman and other NES hacks for PCE
« Reply #67 on: February 27, 2011, 05:00:18 pm »
Sounds like it's time for me to un-shelve my MM1 sprite improvement project!  I'll begin by redrawing the sprites within the original constraints, then I'll see about using the enhanced color support.  I may need help understanding how to find and change what palette is used, or at worst someone else may need to actually implement them.  I'll start drawing when I get home tonight, and hopefully I can post pictures for you to see if you like the results.

tomaitheous

  • Hero Member
  • *****
  • Posts: 543
    • View Profile
    • PC Engine Dev
Re: Megaman and other NES hacks for PCE
« Reply #68 on: February 28, 2011, 12:17:20 am »
 flamepanther: This might help:

I built all the sprite frames into 32x32 unique frames into vram (flipped frames are handled via the OAM table). This allows for 24 unique 32x32 detailed frames. I think that covers all of them (minus flipped versions). If not, I might be able to make room for more. The 32x32 sprite frames are stored as two rows of 32x16 (as seen in the above pic).

Piotyr: "on nes"? You mean the PCE version running on the NES?

tc

  • Hero Member
  • *****
  • Posts: 1108
  • Lum Fan
    • View Profile
    • Eon Blog
Re: Megaman and other NES hacks for PCE
« Reply #69 on: February 28, 2011, 01:58:45 am »
How much of PCE's power does this grant access to? Not that we'd hit Bomberman 94 or Dracula X level. :laugh:

flamepanther

  • Jr. Member
  • **
  • Posts: 38
    • View Profile
Re: Megaman and other NES hacks for PCE
« Reply #70 on: February 28, 2011, 02:18:38 am »
That should indeed make things much easier!

No pics from me tonight, unfortunately.  I can't get Photobucket to load tonight, for some reason.

Progess!




Once I start getting into extended colors, I expect it to start looking more like this...




I hope everyone will like something a little between the styles of MegaMan 7 and 8. :)
« Last Edit: February 28, 2011, 03:04:33 am by flamepanther »

Piotyr

  • Hero Member
  • *****
  • Posts: 1477
  • I'm useful, honest!
    • View Profile
Re: Megaman and other NES hacks for PCE
« Reply #71 on: February 28, 2011, 07:12:11 am »
Hack Super Dodge Ball TO PCE? That game was ported officially, Nekketsu Koukou Dodgeball Bu PC Bengai Hen.

The arcade version was ported. The nes version is VERY different.

Zeemis

  • Sr. Member
  • ****
  • Posts: 309
  • ジーミス
    • View Profile
Re: Megaman and other NES hacks for PCE
« Reply #72 on: March 08, 2011, 04:21:18 am »
All the links on this page are dead.

tomaitheous

  • Hero Member
  • *****
  • Posts: 543
    • View Profile
    • PC Engine Dev
Re: Megaman and other NES hacks for PCE
« Reply #73 on: March 23, 2011, 12:19:23 am »
http://pcedev.wordpress.com/ <- the download and links section. I took down the hucard version. Only the CD version of MM is up there.

tomaitheous

  • Hero Member
  • *****
  • Posts: 543
    • View Profile
    • PC Engine Dev
Re: Megaman and other NES hacks for PCE
« Reply #74 on: July 26, 2011, 10:54:04 pm »
Updated main page of this thread. Small update to Megaman 1 (links to build on blog site). Started work on Megaman2 project now :)

TimeCop

  • Jr. Member
  • **
  • Posts: 40
    • View Profile
Re: Megaman and other NES hacks for PCE
« Reply #75 on: November 26, 2013, 05:42:15 pm »
How is the color palette handled since I know the NES handles color palettes a lot differently than the PCE. The NES has no standard color palette and relies on the TV itself, whereas the PCE has a much more standard setup.

tomaitheous

  • Hero Member
  • *****
  • Posts: 543
    • View Profile
    • PC Engine Dev
Re: Megaman and other NES hacks for PCE
« Reply #76 on: December 27, 2013, 12:49:46 am »
How is the color palette handled since I know the NES handles color palettes a lot differently than the PCE. The NES has no standard color palette and relies on the TV itself, whereas the PCE has a much more standard setup.

 For the color/palette upgrades? That's handled via an extension that passes the palette data directly to the PCE hardware, instead of the NES video emulation. And that format is 9bit RGB (3bit Red, 3bits Green, 3bits Blue).


 Megaman2 is about 95% complete, public,  and beatable. Again, there's no patch file - so all links are in my blog site.

wyndcrosser

  • Full Member
  • ***
  • Posts: 199
    • View Profile
Re: Megaman and other NES hacks for PCE
« Reply #77 on: December 27, 2013, 11:38:43 am »
Great work as always Tomaitheous. I'm thoroughly impressed.

Drakon

  • Sr. Member
  • ****
  • Posts: 277
    • View Profile
    • 16 Bit Gamer
Re: Megaman and other NES hacks for PCE
« Reply #78 on: December 27, 2013, 09:54:40 pm »
Tomaitheous is romhacking royalty.  So is snarfblam, gideon, spikeman, and many others.

Yoshiatom

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
Re: Megaman and other NES hacks for PCE
« Reply #79 on: December 28, 2013, 12:54:59 pm »
Nice work! There is work still to be done though...

Still, I'm looking forwad to when you finish your Nes to pce ports!  ;)