Author Topic: NES to PCE  (Read 282 times)

turboxray

  • Newbie
  • *
  • Posts: 8
Re: NES to PCE
« Reply #15 on: December 09, 2019, 10:02:16 AM »
I don't have a definitive list, but I know these were done:

Duck Tales 2
Robo Warrior
Super Mario Bros
Contra
Castlevania
Jackal
Mega Man
Mega Man 2

 And Dragon Warrior, which was on PCE CD. I didn't purposely remove them haha. I let my hosting service expire. I figured the roms (and megaman CD) had already been distributed around. If anyone wants the source to these projects, I'll put links back up.

 A little back story: It all started back in 2007, when as a laugh I told Charles MacDonald that I bet I could get Dragon Warrior up and running on the PCE. I never expected it to be very playable or even at a decent speed. I was shocked, that even with more advance emulation overhead for the NES hardware, the games still ran faster than on the original NES. So I started looking at other games. I never took any of this stuff seriously. It was just novelty. Pretty much Meganman 1 & 2 received all my time. It's why the sound/music in the other games don't sound as good. Those other ones, I literally tweaked them for the reusable emulation core in like two days. The Contra one I inherited from an emulation author that mess around with the source emu code for a day. I never really did anymore than what he did.

 How does it work? The NES cpu, for the most part, is 99.99% backward compatible to the PCE's cpu. The PCE's cpu is about 4x faster, but since the NES doesn't take advantage of the extra instructions on the PCE, it's more like ~3.7x faster. Anyway, so the native NES code just runs on the PCE so I don't have to emulate it. Emulating the 'mappers', at least for main memory (rom), is super simple and it's never finer than the PCE's built-in 8k mapping hardware. The sound engine isn't so bad either; most things convert over pretty easy - I just use translation tables for the volume and frequencies (notes). The pain, and some cpu overhead, is decoding the weird bits packed across multiple registers, and emulating the weird quirks of the NES sound hardware (it's not clean like the PCE's sound design). The biggest pain in the ass is the video though. Other than both systems using tiles and sprites, they couldn't be more different in almost every aspect. Things like; the NES has an 8bit port to the video chip while the PCE's port is 16bit (this is a huge pain in the ass), the tilemap on the NES clips shorter vertically while it doesn't on the PCE (so the PCE has to do an mid screen interrupt to 'sew' the screen up), the nes has tilemap mirroring that can be changed on the fly (PCE has no such thing and mirroring has to be emulated by writing to two different sections of a tilemap), nes palettes for tilemap is atrocious and convoluted! The sprites on the NES are 8x8 or 8x16, but the smallest on the PCE is 16x16 so I have to parse the sprite table of the nes and translate the coords so flipped sprite cells in metasprites will align up. There's just all these little nuances that add processing overhead. For joypads I just replace the originally tiny routine with something custom - no use wasting cpu resource to serially read out the gamepad info. Each game is usually slightly different for how to strings the bits back together for the game, so I just make slight adjustments to a core nes to pce gamepad routine.

 So that's basically how it works. NES code runs normally on the PCE, but I patched all the load/store instructions that interface with hardware to call my emulation code. Because I'm only emulating what I need, using other NES games with the emu core tends to have graphical glitches; it just means the video or sound emulation code needs more support written in.

 Novelty of playing some NES games on your PCE aside, the potential was in hacking or upgrading for the PCE. Code could slowly be replaced in the nes2pce rom to use direct PCE hardware. You could mix and match. I thought people would be interested in doing this (I mean, if you make it a CD project then you have CD music to use!), since the rom hacking scene does some incredible stuff.. and anyone who's done NES hacking would find the PCE extremely easy to work with (it's such a simple and clean design in comparison). Even with games like Megaman 2... still no one seemed interesting. The last one I did was Jackal, and that was for myself. Two players it's pretty fun - always loved that game. But the lack of slow-down on the nes2pce version makes it more difficult! Games like Castlevania are graphically near complete (99%), but the music emulation is missing some stuff and doesn't sound the greatest. I was planning on making Castlevania a CD game with CD music. SMB I did for shits and giggles, and figured at some point I'll update the sound emulation so it would sound better, but never got around to it. Megaman 1 CD version has easy/normal difficulty settings and stereo separate settings through the start menu.

 There's a 5-in-1 unlicensed rom from the netherlands that has SMB on it. It doesn't use emulation. Everything's been hacked and replaced to use PCE hardware directly. That means changing all kinds of game's assets. It's also meant for PAL PCE systems so the colors are off (and I think speed as well).

 And yes, tobias sold my megaman CD (the one without the CD music I believe) as a lost prototype.  No, that's not why I stopped working on these. I could just never get a community or group up around these. I mean yeah the source is pretty technical, but I always made myself available to help anyone that wanted to work with stuff (I advertised that on RHDN too). I had no interest in doing everything myself. Rom hacking is fun in small doses, but it's not really my thing. But! Just imagine taking graphic assets and musics from Rondo and refacing the original Castlevania. That'd be pretty great haha.
« Last Edit: December 09, 2019, 10:09:38 AM by turboxray »

nectarsis

  • Hero Member
  • *****
  • Posts: 3567
Re: NES to PCE
« Reply #16 on: December 09, 2019, 03:56:41 PM »
I don't have a definitive list, but I know these were done:

Duck Tales 2
Robo Warrior
Super Mario Bros
Contra
Castlevania
Jackal
Mega Man
Mega Man 2

 And Dragon Warrior, which was on PCE CD. I didn't purposely remove them haha. I let my hosting service expire. I figured the roms (and megaman CD) had already been distributed around. If anyone wants the source to these projects, I'll put links back up.

 A little back story: It all started back in 2007, when as a laugh I told Charles MacDonald that I bet I could get Dragon Warrior up and running on the PCE. I never expected it to be very playable or even at a decent speed. I was shocked, that even with more advance emulation overhead for the NES hardware, the games still ran faster than on the original NES. So I started looking at other games. I never took any of this stuff seriously. It was just novelty. Pretty much Meganman 1 & 2 received all my time. It's why the sound/music in the other games don't sound as good. Those other ones, I literally tweaked them for the reusable emulation core in like two days. The Contra one I inherited from an emulation author that mess around with the source emu code for a day. I never really did anymore than what he did.

 How does it work? The NES cpu, for the most part, is 99.99% backward compatible to the PCE's cpu. The PCE's cpu is about 4x faster, but since the NES doesn't take advantage of the extra instructions on the PCE, it's more like ~3.7x faster. Anyway, so the native NES code just runs on the PCE so I don't have to emulate it. Emulating the 'mappers', at least for main memory (rom), is super simple and it's never finer than the PCE's built-in 8k mapping hardware. The sound engine isn't so bad either; most things convert over pretty easy - I just use translation tables for the volume and frequencies (notes). The pain, and some cpu overhead, is decoding the weird bits packed across multiple registers, and emulating the weird quirks of the NES sound hardware (it's not clean like the PCE's sound design). The biggest pain in the ass is the video though. Other than both systems using tiles and sprites, they couldn't be more different in almost every aspect. Things like; the NES has an 8bit port to the video chip while the PCE's port is 16bit (this is a huge pain in the ass), the tilemap on the NES clips shorter vertically while it doesn't on the PCE (so the PCE has to do an mid screen interrupt to 'sew' the screen up), the nes has tilemap mirroring that can be changed on the fly (PCE has no such thing and mirroring has to be emulated by writing to two different sections of a tilemap), nes palettes for tilemap is atrocious and convoluted! The sprites on the NES are 8x8 or 8x16, but the smallest on the PCE is 16x16 so I have to parse the sprite table of the nes and translate the coords so flipped sprite cells in metasprites will align up. There's just all these little nuances that add processing overhead. For joypads I just replace the originally tiny routine with something custom - no use wasting cpu resource to serially read out the gamepad info. Each game is usually slightly different for how to strings the bits back together for the game, so I just make slight adjustments to a core nes to pce gamepad routine.

 So that's basically how it works. NES code runs normally on the PCE, but I patched all the load/store instructions that interface with hardware to call my emulation code. Because I'm only emulating what I need, using other NES games with the emu core tends to have graphical glitches; it just means the video or sound emulation code needs more support written in.

 Novelty of playing some NES games on your PCE aside, the potential was in hacking or upgrading for the PCE. Code could slowly be replaced in the nes2pce rom to use direct PCE hardware. You could mix and match. I thought people would be interested in doing this (I mean, if you make it a CD project then you have CD music to use!), since the rom hacking scene does some incredible stuff.. and anyone who's done NES hacking would find the PCE extremely easy to work with (it's such a simple and clean design in comparison). Even with games like Megaman 2... still no one seemed interesting. The last one I did was Jackal, and that was for myself. Two players it's pretty fun - always loved that game. But the lack of slow-down on the nes2pce version makes it more difficult! Games like Castlevania are graphically near complete (99%), but the music emulation is missing some stuff and doesn't sound the greatest. I was planning on making Castlevania a CD game with CD music. SMB I did for shits and giggles, and figured at some point I'll update the sound emulation so it would sound better, but never got around to it. Megaman 1 CD version has easy/normal difficulty settings and stereo separate settings through the start menu.

 There's a 5-in-1 unlicensed rom from the netherlands that has SMB on it. It doesn't use emulation. Everything's been hacked and replaced to use PCE hardware directly. That means changing all kinds of game's assets. It's also meant for PAL PCE systems so the colors are off (and I think speed as well).

 And yes, tobias sold my megaman CD (the one without the CD music I believe) as a lost prototype.  No, that's not why I stopped working on these. I could just never get a community or group up around these. I mean yeah the source is pretty technical, but I always made myself available to help anyone that wanted to work with stuff (I advertised that on RHDN too). I had no interest in doing everything myself. Rom hacking is fun in small doses, but it's not really my thing. But! Just imagine taking graphic assets and musics from Rondo and refacing the original Castlevania. That'd be pretty great haha.

I'd like to personally say thank you for all your work thru the years...some of these were awesome to play...always wished the fully upgraded Dragon Warrior would've come out.
My Blogger profile with all my blogs of wonderment:<br><a href="http://www.blogger.com/profile/08066967226239965436" class="bbc_link" target="_blank">http://www.blogger.com/profile/08066967226239965436</a>

AkumajoTonyX

  • Jr. Member
  • **
  • Posts: 79
  • "Into The Unknown!"
Re: NES to PCE
« Reply #17 on: December 09, 2019, 06:30:07 PM »
Please by all means, you are welcome to put up some new active links. I am very intrigued about these ports.

 :icon_cat_happy:

Turboschmuck

  • Newbie
  • *
  • Posts: 11
Re: NES to PCE
« Reply #18 on: December 09, 2019, 10:31:54 PM »
https://www.ebay.com/itm/NEW-CAPCOM-Mega-Man-Rockman-PC-Engine-Turbo-Grafx-Super-CD-Game-Factory-shield/283700946331?hash=item420de4e59b:g:Q4MAAOSwZb9d6Zkr

saw this today while browsing ebutt and it made me think no wonder homeboy stopped making these for free lol
Yeah someone needs to report that fool. Seriously, surprised Capcom hasn't had a shit fit over this yet.

turboxray

  • Newbie
  • *
  • Posts: 8
Re: NES to PCE
« Reply #19 on: December 09, 2019, 11:33:29 PM »
I'd like to personally say thank you for all your work thru the years...some of these were awesome to play...always wished the fully upgraded Dragon Warrior would've come out.

 Thanks!! I wished I had shared more of what I had done for the PCE (demos, tests, tricks, etc). I kept a lot of it private between only a few people, and some of it is gone now (I've been digging through my PCE archives recently).

 Don't you code? I thought I remember you saying you developed in some higher level languages/environments. My point being, I realized it was actually more work to upgrade the original Dragon Warrior for all new stuff, than it would be to just write the game from scratch. It's a pretty simple RPG. Could even be done in HuC. I think that would be more interesting, because then you have a RPG engine out of that to do whatever with. That would make for a nice open source community project.


nectarsis

  • Hero Member
  • *****
  • Posts: 3567
Re: NES to PCE
« Reply #20 on: December 10, 2019, 03:48:18 AM »
I'd like to personally say thank you for all your work thru the years...some of these were awesome to play...always wished the fully upgraded Dragon Warrior would've come out.

 Thanks!! I wished I had shared more of what I had done for the PCE (demos, tests, tricks, etc). I kept a lot of it private between only a few people, and some of it is gone now (I've been digging through my PCE archives recently).

 Don't you code? I thought I remember you saying you developed in some higher level languages/environments. My point being, I realized it was actually more work to upgrade the original Dragon Warrior for all new stuff, than it would be to just write the game from scratch. It's a pretty simple RPG. Could even be done in HuC. I think that would be more interesting, because then you have a RPG engine out of that to do whatever with. That would make for a nice open source community project.

LOL you've got me mixed up with someone else...I'm the guy that's happy when he hits power, and everything turns on/works LOL
My Blogger profile with all my blogs of wonderment:<br><a href="http://www.blogger.com/profile/08066967226239965436" class="bbc_link" target="_blank">http://www.blogger.com/profile/08066967226239965436</a>