Author Topic: NES to PCE  (Read 6108 times)

turboxray

  • Newbie
  • *
  • Posts: 15
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: 3607
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: 14
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: 15
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: 3607
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>

Arkhan

  • Hero Member
  • *****
  • Posts: 14142
  • Fuck Elmer.
    • Incessant Negativity Software
Re: NES to PCE
« Reply #21 on: January 23, 2020, 04:14:07 PM »
I could definitely do a CD based Dragon Warrior style game on PCE based off of:

1) I thought about it a bunch of times
2) CD is huge, game is small
3) I've got experience with making (but never finishing) RPGs in a handful of engines.   They were never finished because I was always just playing around with stolen artwork and shit for fun.  I'm experienced enough with all of the things necessary for an RPG including the design/testing/balancing aspect having over-examined some systems, played the living shit out of alot of them, and running pen & paper stuff too.

Depending on how other projects in my pipeline pan out, I might revisit the idea to make a basic game based off of an idea I had in the past.

You will not be getting some long winded story driven cutscene filled Cosmic Fantasy 5 shit, though.
[Fri 19:34]<nectarsis> been wanting to try that one for awhile now Ope
[Fri 19:33]<Opethian> l;ol huge dong

I'm a max level Forum Warrior.  I'm immortal.
If you're not ready to defend your claims, don't post em.

Trenton_net

  • Hero Member
  • *****
  • Posts: 502
Re: NES to PCE
« Reply #22 on: January 27, 2020, 11:17:18 AM »
Would it be possible to port the NES homebrew game Micro Mages to the PCE, with Multi-tap support? That would be incredible!

turboxray

  • Newbie
  • *
  • Posts: 15
Re: NES to PCE
« Reply #23 on: January 27, 2020, 12:03:43 PM »
Would it be possible to port the NES homebrew game Micro Mages to the PCE, with Multi-tap support? That would be incredible!

Very easily haha. And when you buy the game, they give you the rom too. But out of respect for the developers, I'd ask for their permission first. Which reminds me.. I need to release all the source for the existing nes2pce project (without the nes roms though). Give it a little bit of documentation too haha.


I could definitely do a CD based Dragon Warrior style game on PCE based off of:

1) I thought about it a bunch of times
2) CD is huge, game is small
3) I've got experience with making (but never finishing) RPGs in a handful of engines.   They were never finished because I was always just playing around with stolen artwork and shit for fun.  I'm experienced enough with all of the things necessary for an RPG including the design/testing/balancing aspect having over-examined some systems, played the living shit out of alot of them, and running pen & paper stuff too.

Depending on how other projects in my pipeline pan out, I might revisit the idea to make a basic game based off of an idea I had in the past.

You will not be getting some long winded story driven cutscene filled Cosmic Fantasy 5 shit, though.
DW1 has pretty minimal content, so it would be a great first attempt at an RPG project haha. Could even take tiles/sprites from the SNES remake for upgraded graphics.

Trenton_net

  • Hero Member
  • *****
  • Posts: 502
Re: NES to PCE
« Reply #24 on: January 27, 2020, 02:29:55 PM »
Would it be possible to port the NES homebrew game Micro Mages to the PCE, with Multi-tap support? That would be incredible!

Very easily haha. And when you buy the game, they give you the rom too. But out of respect for the developers, I'd ask for their permission first. Which reminds me.. I need to release all the source for the existing nes2pce project (without the nes roms though). Give it a little bit of documentation too haha.

I would totally buy a PCE version of the game if one existed. If such a version was donated to them for sale, I'm sure a bunch of us here would probably be willing to pay. Quality is quality after all.

nectarsis

  • Hero Member
  • *****
  • Posts: 3607
Re: NES to PCE
« Reply #25 on: January 27, 2020, 03:18:12 PM »
I could definitely do a CD based Dragon Warrior style game on PCE based off of:

1) I thought about it a bunch of times
2) CD is huge, game is small
3) I've got experience with making (but never finishing) RPGs in a handful of engines.   They were never finished because I was always just playing around with stolen artwork and shit for fun.  I'm experienced enough with all of the things necessary for an RPG including the design/testing/balancing aspect having over-examined some systems, played the living shit out of alot of them, and running pen & paper stuff too.

Depending on how other projects in my pipeline pan out, I might revisit the idea to make a basic game based off of an idea I had in the past.

You will not be getting some long winded story driven cutscene filled Cosmic Fantasy 5 shit, though.


always held on to that DW version being finished, as would love Final Fantasy 1.....both those with PCE huey tunes would be heavenly.
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>

Keith Courage

  • Hero Member
  • *****
  • Posts: 2646
Re: NES to PCE
« Reply #26 on: January 29, 2020, 10:17:34 PM »
I know this is a NES to PCE discussion but I was wondering about adding CD music to Chip tune games. I know you did this on megaman with the CD version which is fantastic. How much work would it be to implement say the Arcade music for Ninja Spirit into the game via CD? That would be just plain awesome! There are a few other arcade ports on the PCE that could benefit from this treatment.

I know this stuff takes a lot of time and I was just curious how much work something like this would be compared to a complete NES to PCE conversion.

turboxray

  • Newbie
  • *
  • Posts: 15
Re: NES to PCE
« Reply #27 on: January 30, 2020, 09:46:33 AM »
I know this is a NES to PCE discussion but I was wondering about adding CD music to Chip tune games. I know you did this on megaman with the CD version which is fantastic. How much work would it be to implement say the Arcade music for Ninja Spirit into the game via CD? That would be just plain awesome! There are a few other arcade ports on the PCE that could benefit from this treatment.

I know this stuff takes a lot of time and I was just curious how much work something like this would be compared to a complete NES to PCE conversion.

There's two approaches to that. One is to make the hucard a CD game. Assuming it fits in CD RAM, then you go about hacking the music routine to play CD tracks instead. It's usually no too much work, but the problem tends to be CD ram. Using the arcade card for a hucard to CD conversion, is a pain in the ass because the arcade card ram is not random access like the 256k of SuperCD ram, so that means an extremely involved hack of moving data assets into ACD ram... it's just a huge undertaking. The other CD game option, is to use the turbo everdrive 2.x card since it allows up 4MB of ram. More than enough to convert whatever hucard to CD format.

 The second option would be to hack the hucard with CD functions. Basically, your code would look for the presence of the CD unit and check if a CD was in the drive (as well as the number of audio tracks), and then it could switch routines to play from CD tracks. The CD was just be an audio CD. That involves the least amount of hacking, but no one has isolated and ripped CD audio routines for use like this - so you'll need that bit of overhead to figure out (but it's a one and down thing).

 I'd personally go with the second option. And yes, it would be a lot easier than nes2pce stuff.