Jump to content
IGNORED

VCS on the TurboGrafx-16/PC Engine


NinjaWarrior

Recommended Posts

I tend to say no. The processor in the TG16 is very similar, being based on the 6502. However it would be difficult to create an emulator. You would need to emulate the TIA and the RIOT. The TG16 CPU was about 6 times faster, which isn't enough time to be able to emulate these functions. The only way I can imagine getting a 2600 emulator running, is to put some hardware into the hucard, to take some of the load of the CPU.

Link to comment
Share on other sites

Yes, even though the CPU is similar, the rest of the hardware is hugely different so, without custom hardware, you'd have a very slow emulator; of course, if you don't mind the speed, that would be okay as a programming experiment.

 

As an alternative, how about implementing the emulator as a static recompiler? You could make a program that would disassemble the Atari 2600 ROM, analyze it, and output the corresponding PCE code; the resulting program would then be able to run directly on the PCE's hardware. Yes, that's actually harder than it sounds; the few examples I've seen of such a thing require some manual editing of the converted code.

Link to comment
Share on other sites

I'd say: no chance! To get a 99% emulation you'll need a system that's much faster than the VCS. The CPU is similar, but lacks from illegal opcodes that are used in some of the carts. You need to trap reads and writes to the I/O area to simulate the hardware. For this your CPU needs to be faster than the VCS, or you'll need additional hardware like an fpga.

 

Just to give you some numbers: I ported Stella to the Dreamcast, which has a 200MHz SH4-Prozessor and a 25MHz ARM coprocessor for audio output. Even though, I managed to split the sound code for the ARM and the main emulation code for the SH4, I didn't manage to get the speed up to always 100%. Most games where playable, though.

 

If I extrapolate the features that have been added to Stella, I'd say for a 100% VCS emulation you'll look for a (ARM, PPC, X86) cpu, that has about 400 MHz or more.

Link to comment
Share on other sites

Since a virtual machine isn't possible due to the low clock speeds what is needed is more along the lines of a recompiler. Anybody remember the Liberty Gameboy emulator for Palm Pilot PDAs? Something along those lines.

 

The big problem here is the radically different way the VCS handles graphics. Although assembly and system calls could be re-interpreted the "riding the beam" technique the VCS uses would be prohibitively complicated/CPU intensive .

Link to comment
Share on other sites

  • 2 weeks later...

Any released 2600 game could be ported to the TG16, and include graphics enhancements as well. There is plenty of space on a Hu-Card, about 2.5 MB, to hold probably a dozen titles. The cd could be used to hold a ported version of every game that come out for the Atari. This is different than the approach used for the anthology games. I believe they wrote an emulator and loaded roms for the classic version of each of those games. I have a TG16, but have not yet tackled programming for it. However you might try http://pcenginefx.com/main/hucengine.html. They will have the information you need to develop on it. But please post any progress here as well, I would be interested in 2600 games on the TG16.

Link to comment
Share on other sites

Hi Guys,

 

I'm quite a newbie regarding the TG16/PEengine/Coregrafx.

 

What about the pirate 6-in 1 famicom games for the PC engine ? Is it emulated or reprogrammed games ?

 

I'm not sure how those have been made, but there's some information on a fan translation of NES Mega Man for the PC-Engine: http://www.digitpress.com/forum/showthread.php?136463-Megaman-1-on-your-PC-Engine-TG16

  • Like 1
Link to comment
Share on other sites

Thanks for the info guys

 

Also, How about game programmed for the TurboGrafx-16 like

 

Activision Anthology

Atari Anthology

 

on the PS2

 

See, now we're talking about a quantum leap in hardware power. Those would be true emulators. The TG16 NES ports were possible due to architecture similarities and the fact both NES and TG16 used tiles.

Link to comment
Share on other sites

The NES and TG16 had a lot in common. The NES ran at 1.79MHz, while the TG16 could ran at 1.79 or up to 7.16MHz, 4 times faster than NES. Most NES games were under 1 meg, so they could easily fit on the HuCard. The processors were nearly identical. So the changes would be to the graphics and sound. Which was still easier than the changes that they would need to make for the 2600. Each game had to be reprogrammed to work on the TG16, not enough time to emulate much. The NES uses 5.37MHz for graphics, which the TG16 supports as it's lowest quality setting. Making a nes game run faster doesn't always ruin the graphics, unlike the 2600 which can't be sped up, because the whole system is synced to the TV. However pretty much every system after has a dedicated chip that is synced to the TV, and a graphics ram buffer. The graphics unit must run at the same frequency, but the rest of the system is independent. After disassembling the game rom, every place where information is stored into the graphics or sound chips, changes are made. The locations of these are different, and the format is usually different. Both systems had sound channels, 6 on TG16, and 5 on NES, so sound is relatively easy to convert, for the most part simply writing it to a different port. Most of the changes are to the graphics. The nes has 8x8 and 8x16 sprites.The TG16 supported 16x16 sprites as the smallest sprite, so transparent pixels would have to be appended to convert between the two sizes, but positioning info wouldn't change because the upper left location would still be the same position. They also both supported the same amount of sprites, 64. It would be a lot of work, but would be possible for most of the games to be ported to the TG16 from the NES.

Here is a link to the blog for the megaman development that haroldoop mentioned http://pcedev.wordpress.com/category/megaman/

  • Like 1
Link to comment
Share on other sites

Yeah, a 2600 game on the TG16 isn't going to happen unless you port it (write it yourself) or seriously hack the ever-living-hell out of the 2600 rom (re-writing all the sound and graphic routines). Both cases are doable; both cases require a lot of work and dedication.

 

NES shares fundimentals with the NES like tiles, tilemaps, sprites, sprite tables, etc. But it ends there. The planar style and planar byte order are different between the two, the sprite coords are different, tilemap format and layout is different, vram and where everything goes is *completely* different. Hell, the TG16 GPU only takes 16bit read/writes (port) where as the NES PPU is an 8bit port (this creates a serious headache for only the fly conversions and writing to vram; tilemaps, tiles. sprites, everything). And there's the fact that the NES has some hardware specific things that the PCE doesn't not have (the NES tilemap mirroring is a pain in the ass to simulate on the PCE - requires hsync interrupt code to fix it).The graphic emulaton on the NES2PCE ports is realtime. The graphic assets (tilemap, tiles, sprites) are all in their original format and converted on the fly as the NES code writes to the PPU and APU ports (the only thing hacked in the rom are the port read and writes; replaced with JSRs to emulation backend code). Even though the PCE/TG16 cpu runs 4x as fast, I'm still amazed that the backend emulation code is able to keep up (it does and Megaman even has elimination of slowdown of the NES original - hah!).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...