2/13/2025: Localization News - Cosmic Fantasy 3-4!

Rather earth-shattering news in the PC Engine / TurboGrafx-16 community: Cosmic Fantasy 3 & 4 has been officially localized to English by Edia 30 years later for the Switch! Hard to believe! I know their script quality is poor given the 1&2 port but still good to see.
nintendo.com/us/store/products/cosmic-fantasy-collection2-switch/
Main Menu

New PCE/TG16, Supergrafx emulator

Started by AamirM, 12/06/2008, 09:41 AM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

AamirM

Hi,

I developed a PCE/TG16, Supergrafx emulator focusing on being as accurate as possible. Just wanted to share it here. Download it from here. Note that Avira antivirus will give a false positive on the included file because I used UPX. It has been reported and it will get fixed (full details here). Also, due to the way it emulates the hardware, it requires a rather powerful PC to run.

Comments, suggestions etc... are welcomed.

stay safe,

AamirM

TurboXray

Comments:

 You have some timing issues for latching X/Y on a scanline.
 No support for B&W mode.
 Some anomalies in the audio hardware. 10bit audio paired channels don't work correctly (might be in your mixing).
 Noticed a weird artifact in VPC emulation for SGX.
 some demos don't run (i.e. blank screen). My LFO test rom doesn't work either, so I couldn't check out LFO accuracy

AamirM

Hi,

QuoteYou have some timing issues for latching X/Y on a scanline.
Hmmm.....any examples? I mean, how did you found out? Is there any game which is having a problem because of this?

QuoteNo support for B&W mode.
It *is* supported. I just realized I made a silly mistake in the code :oops: . Enable the brighten option and it should work ;) . The bug will be fixed in the next version.

QuoteSome anomalies in the audio hardware. 10bit audio paired channels don't work correctly (might be in your mixing).
Noticed a weird artifact in VPC emulation for SGX.
Again, I will need something which does this to fix it. It seems you have some test program. Can you give them to me?
Also, which wierd artifact are you referring to? Where does it happen?

Quotesome demos don't run (i.e. blank screen). My LFO test rom doesn't work either, so I couldn't check out LFO accuracy
If its possible, give them to me and I'll try to fix my emu. Also, LFO is not supported atm.

Thanks for the comments. Keep them comin' ;) .

stay safe,

AamirM

TurboXray

#3
QuoteHmmm.....any examples? I mean, how did you found out? Is there any game which is having a problem because of this?
Here's a *few* to test roms:
http://pcedev.net//test_roms/bloodyw_.pce  - enter the game, the game area screen below the status bar should be jumping. (Yes, jumping) Later levels for vertical scrolling parts, you should see the 'sew' line for when they used an Hsync to sew the BG together, skipping over the status bar section in the BAT. This game tries to access the upper 128k, but that's open BUS. You'll have problems with that later in Camp California if you get into emulating CD games.
http://pcedev.net//test_roms/lfo_test2.pce - LFO test app. Not just LFO, it won't let the user change the first four ram values.
http://pcedev.net//test_roms/pcmplay.pce - 10bit pcmplay demo. It might a sample thing your doing? What rate are you sampling audio register writes?
http://pcedev.net//test_roms/SGXdemo.pce - walk Link under the windows. He appears to have some horizontal interleaving of missing pixels?
http://pcedev.net//test_roms/sigma_star.pce - another scroll latch test. the third cloud scroll from the top. It shouldn't have the line of the next scroll below it (it showing two long pixels of that scroll on TE).

 Some of the other demos are private and I probably don't have permission to give them out (the ones that show a blank screen). You might want to check out Chris Covell's demos too. His axelay SGX demo only showed a black screen.

AamirM

#4
Thanks. I'll be looking at them shortly. Is there any way you can get permission to give private demos to me? :)

Btw, did B&W mode worked?

EDIT:

Okay just tried them out. All the demos, except the last two, don't work (in mednafen as well). But that maybe because of a problem in the emulator. I'll try to fix the bugs. Also, Chris Covell's axelay demo works here. Are you loading it through "Load Supergrafx ROM"?

stay safe,

AamirM

TurboXray

 Ohh! The SGX rom you have to rename it with the .sgx extension for mednafen to play it correctly (in SGX mode). Sorry about that.

 Also, Sigma_star shows fine in the version of mednafen that I have (0.8.A). It shows wrong in yame as well.

 Yeah, I forgot the axelay demo rom that I had was modified for SCD :D

OldRover

Hey, this isn't a half bad emulator. No CD emulation though?
Turbo Badass Rank: Janne (6 of 12 clears)
Conquered so far: Sinistron, Violent Soldier, Tatsujin, Super Raiden, Shape Shifter, Rayxanber II

AamirM

QuoteHey, this isn't a half bad emulator. No CD emulation though?
Well, I'll be honest and say that CD emulation will be worked on when I get my hands on some CDROMs first ;) . But yeah, my goal is to get it working decently in the next version. The HuCard support is already very good (in terms game compatibility) and there are only three games (Battle Royale, Double Dugneons and Champions Forever Boxing) I am aware of which do not work. Two of them (Double Dugneons and Champions Forever Boxing) I fixed yesterday so there is only one game now that doesn't work. And even that is due to edge case timer behaviour. I wanted to get good VDC/VCE and CPU emulation first so that when there are problems with CDROM games, I can be sure it isn't the CPU or VDC. But as it turns out due to the testing of Tom here, I am not quite there yet.

Mednafen

Here's a sadistic test for your HuC6280/VDC emulation: http://sarsie.fobby.net/junk/irq3.zip
It should display a picture of Bob Dole for a fraction of a second, and then the Lord of Nightmares wielding a shovel.

If it only shows Bob Dole, the test fails. :b

Two rather prominent HuCard games that I know rely on correctly emulating what this test tests: Jackie Chan's Action Kung Fu(may work correctly even if you emulate it incorrectly), and Final Soldier(will be in "vibrating mode" unless you emulate it correctly ;)).

The reason this issue comes up is because the games erroneously(I presume, though I didn't read the programmers' minds) do:

cli
lda $0000

when they should've done:

lda $0000
cli

"CLI/SEI changes to the I flag are delayed by 1 instruction" is only a convenient generalization to inner 6502-family behavior, which works on most cases, but not all.

You need to sample the external IRQ inputs masked against the I flag before the action of the last effective cycle of the current instruction is completed(be it setting/clearing the I flag, or doing a read).

This "CLI/acknowledge" double-IRQ issue does not appear to affect timer IRQs, interestingly enough.  Though I acknowledged the timer IRQ with a write...it's always possible that the IRQ sampling semantics are different on a write than a read, though I doubt it, it's probably just a timer nuance. (But I'll try to remember to test it sometime)

AamirM

QuoteIf it only shows Bob Dole, the test fails. :b
Failure :( .

QuoteTwo rather prominent HuCard games that I know rely on correctly emulating what this test tests: Jackie Chan's Action Kung Fu(may work correctly even if you emulate it incorrectly), and Final Soldier(will be in "vibrating mode" unless you emulate it correctly ;)).
Both of these games work correctly in TE (Final Soldier isn't vibrating :dance: ). And yes, I am simply just delaying irq by 1 instruction on CLI/SEI. I did this to make Blodia boot. I didn't knew these games relied on it as well.

QuoteYou need to sample the external IRQ inputs masked against the I flag before the action of the last effective cycle of the current instruction is completed(be it setting/clearing the I flag, or doing a read).
Thanks. I'll do it this way.

_Paul

This seems like a really good emulator. It will need something pretty unique to pull me away from Magic Engine though...like a tile viewer/exporter/importer or something neat like that  :D

AamirM

Debugging features will come with time ;) . That is, when I have some free time :D .

spenoza

Ootake pulled me away from Magic Engine quite handily. It just works better.

It took a while, but PCE emulators are actually in good shape right now. There's a lot of competition. If you want to be a hero, build in all the TAS functions they people at tasvideos.org want so PCE games can start showing up on their site.

AamirM

QuoteIt took a while, but PCE emulators are actually in good shape right now. There's a lot of competition. If you want to be a hero, build in all the TAS functions they people at tasvideos.org want so PCE games can start showing up on their site.
Well, I am not competing with any emulator ( :^o ). Just doing it for fun. And, I am not trying to be a hero ( :^o x2). Which means I am too lazy to work on TAS stuff atm. I have to get CDROM working first.

spenoza

Well, either way, I'm sure your hard work will be recognized, especially in this community. Even if it doesn't become the emulator of choice I'm sure you'll end up contributing something valuable.

AamirM

Well, it took longer than I expected but work has been restarted on this again. I am in process of completely re-doing the frontend (GUI etc..). The reason behind it is that I re-used a lot of Regen's code in the frontend which was getting ugly (as Win32 already is), hard to maintain and understand. The fullscreen bug is a example of that. So that is why I am writing a new frontend/framework in C++/MFC. Once that is finished, I'll work on completing the CDROM support. I had already written some code to handle CDROM using ASPI and IOCTL so the bitchy part has been done :dance: .

And if someone has any ideas/refinements for GUI layout etc.., please let me know. I mean, for example, I now have a slider in the bottom of the window for seeking to a previous position in the game since now TE has real time rewind feature.

TurboXray

Ohh. Drag and drop support would be nice as well as 'open with' as well. :D

AamirM

Quote from: Tom on 02/05/2009, 01:13 PMOhh. Drag and drop support would be nice as well as 'open with' as well. :D
Okay :) . The next version will probably come with a installer which may also be able to register .pce,.sgx etc.. files so you'll only need to double click to open them ;).

AamirM

Turbo Engine 0.3 has been released!!

Download from here.

Sorry I couldn't add some more stuff which people and (myself) wanted. Most importantly the audio plugins and command line support. I am kinda releasing this in a hurry as a certain health issue will keep me away from internet for some days. Anyways, enjoy!

stay safe,

AamirM

Arjak

This is a nice emulator! Here's a few problems I found:

-No CD drive support for Vista.

-The select button seems to not function correctly (tested in Final Soldier).
He who dings the Gunhed must PAAAAY!!! -Ninja Spirit

AamirM

#20
Does it say something about "wnaspi32.dll" on startup? You have to download "Wnaspi32.dll" and copy it to the same location as the Turbo Engine executable for CD Rom to work.

Or you can try using this.