Jump to content
IGNORED

ProSystem emulator for the Wii (Wii7800)


raz0red

Recommended Posts

Version 0.1 of Wii7800 (Wii ProSystem emulator) is released, you can get it here:

 

http://www.wiibrew.org/wiki/Wii7800

 

Thanks to all of those you took the time to test the pre-release versions.

 

A special thanks to mimo who suggested adding dual-analog support for Robotron (I didn't even know it supported that option). I am truly addicted...

 

--Raz.

Link to comment
Share on other sites

This is seriously cool folks, Thanks to Raz0red for all his hard work getting it working, now about that light gun support :twisted:

 

Heh.

 

I just added High Score Cart support (for 0.2). Light gun support will be a challenge, but I will definitely look into it.

 

--Raz.

Link to comment
Share on other sites

I've been enjoying a few of my old 7800 favorites. Thanks.

 

I have had some issues though. Only about a third of my roms will start. All others just show a black screen. When I get the black screen, I can just press Home and load another rom so the emu isn't locking up. It also appears POKEY emulation isn't working for me. BallBlazer starts up but has no sound.

 

I've downloaded all my roms from AtariAge's 7800 rom page. Midnight Mutants is one that black screens. Pole Position II is one that works.

Link to comment
Share on other sites

I have had some issues though. Only about a third of my roms will start. All others just show a black screen. When I get the black screen, I can just press Home and load another rom so the emu isn't locking up. It also appears POKEY emulation isn't working for me. BallBlazer starts up but has no sound.

 

Yeah, some of the ROMs on that page do not work (at least w/ the ProSystem emulator), but there are working versions available. I am guessing they don't work on the Windows version either. I created a page to show the hashes of valid ROMs. So, Turn on debug info (in advanced) and ensure your cartridge hash matches the listed working hash on this page.

 

http://www.wiibrew.org/wiki/Wii7800/Cartridge_Compatbility

 

As far as Ballblazer goes, did you change the ProSystem.dat file? You may have replaced the installed one with one that turns off pokey sound for that cartridge. Or, you may have a version that isn't in the database and has Pokey disabled in the header (or no values in the header at all). In any case, turn on debug (in advanced) and check out what it says when the cartridge is loaded. It will report on whether Pokey is enabled in the header and/or the database (the database value will always override).

 

It also sounds like the ProSystem.dat file might be missing altogether or corrupt. So, I would try copying it back out to the /wii7800 directory.

 

--Raz.

Edited by raz0red
Link to comment
Share on other sites

It also sounds like the ProSystem.dat file might be missing altogether or corrupt. So, I would try copying it back out to the /wii7800 directory.

 

--Raz.

 

Replaced the dat file and found replacements for the problematic roms elsewhere. It is working much better. I see slowdowns and some graphics glitches in Midnight Mutants but I believe that is due to the underlying emulator and/or the Wii sometimes coming up a bit short in the CPU grunt department. Still playable though and I can play every 7800 game I used to play now. Good stuff.

Link to comment
Share on other sites

I see slowdowns and some graphics glitches in Midnight Mutants but I believe that is due to the underlying emulator and/or the Wii sometimes coming up a bit short in the CPU grunt department. Still playable though and I can play every 7800 game I used to play now. Good stuff.

 

Yeah, that is actually the core emulator. Unfortunately, the way the emulator currently processes frames is quite inaccurate. It relies heavily on the ROM utilizing VSYNC and WSYNC versus the actual cycle counts unless you have Maria cycle stealing enabled (which is also somewhat inaccurate). I have been messing with these issues recently and my current changes seem to improve Midnight Mutants quite a bit (very few graphical glitches). Hopefully will have an updated release in a week or so.

 

--Raz.

Edited by raz0red
Link to comment
Share on other sites

It'll be interesting to see if "one on one" operates after all these changes. So the cycle counting in Prosystem are innacurate? I actually tried to incorporate them into mess but the didn't seem to make much difference. Mess seems to "mess" up when changing from character mode to graphics mode (or whatever it is). Centipede is a good example.

Link to comment
Share on other sites

It'll be interesting to see if "one on one" operates after all these changes. So the cycle counting in Prosystem are innacurate? I actually tried to incorporate them into mess but the didn't seem to make much difference. Mess seems to "mess" up when changing from character mode to graphics mode (or whatever it is). Centipede is a good example.

 

One on one is running fine with my current tweaks. I did find a pretty major bug in ProSystem that was causing the graphical glitch when maria cycle stealing was enabled (for One on One, etc.). It occurs when a WSYNC occurs within the first 28 cycles. It was incorrectly adding the maria cycles to the 456 value (based on a WSYNC) which was causing a large number of lost cycles on the following scanline resulting in the graphical glitch.

 

I haven't looked at the MESS code, does it correctly account for the 28 cycles (which should possibly be 34) prior to Maria startup?

 

--Raz.

Edited by raz0red
Link to comment
Share on other sites

It has been close to a year since I looked at the mess source code so I'm not sure. The problem with one on one is the play clock counting down to fast. Well that and the demo mode being at hyper speed. :lol: So those are fixed now?

 

Anyways mess doesn't really do any cycle counting for the CPU or maria. When I put in the cycle counting from prosystem I did it for for maria but it didn't seem to make much difference. I tried to use commands to "steal" cpu cycles but that didn't really seem to do much either. I still have the code in there, just disabled.

 

The main difference between mess and prosystem is mess doesn't really bother with the maria line buffer (or whatever it is) at all. It just kinda creates each line as it goes and modifies the previous line if necessary and then displays the whole screen once each frame (start of vblank).

Edited by Shannon
Link to comment
Share on other sites

It has been close to a year since I looked at the mess source code so I'm not sure. The problem with one on one is the play clock counting down to fast. Well that and the demo mode being at hyper speed. :lol: So those are fixed now?

 

With Maria cycle stealing it slows it down to a much more reasonable speed. That is actually in the current build of ProSystem, you have to turn on "cycle stealing" in the .dat file. However, as I mentioned in the previous post, there is a bug that occurs when a WSYNC occurs prior to DMA occurring (it incorrectly adds the Maria time after the WSYNC) which is causing some graphical corruption.

 

Also, the amount of cycles being calculated for Maria for the current version of ProSystem seems inaccurate (seemingly too high). For example, if you try to run Ms. Pac-Man it won't run due to the fact that too many cycles are being consumed by Maria. There are a couple of documents describing cycle count for Maria, unfortunately they are inconsistent.

 

http://www.atarimuseum.com/ahs_archives/ar...maria_specs.pdf

http://www.atarimuseum.com/ahs_archives/ar...tware_guide.pdf

 

The current ProSystem's numbers are quite different from those described in the documents above. It adds 31 cycles per scan line and doesn't account for zone shutdown times or NMIs.

 

--Raz.

Link to comment
Share on other sites

Interesting... I set the flags=1 for one on one in the prosystem.dat file and it runs correctly, as you said. Odd that they would default it to 0..

 

I'll have to re-activate the cycle counting code and see if it plays ok in a7800x, although I thought I tried that already. :ponder:

 

btw, thanks for adding HSC support. I've been wondering when someone would get around to doing it since adding it to mess was easy.

Link to comment
Share on other sites

I only have one question - if HSC was added to the Wii version of ProSystem, can it then be added back into the PC version?

 

It would really help with development...

 

Thanks,

Bob

 

Definitely.

 

I was going to get the Wii version tested and released, and then add those changes to the PC version. I have quite a number of other changes in addition to High Score Cart support. It will probably be a week before the Wii version is released, and then at least a couple of days before I get the PC version updated and out.

 

Curiously, I think I may have found a bug with High Score Cart support. I found that if I register a high score, then go play Xenophobe (you have to actually start a game) it wipes the high score data. I confirmed this with my implementation as well as EMU7800 (haven't tested MESS). Also, PAL versions of cartridges that support the HSC can cause some odd behavior in the high score screen (Dig Dug). So, I was thinking of adding an additional flag to the ProSystem.dat file to indicate which games to enable the cart for.

 

--Raz.

Link to comment
Share on other sites

Interesting... I set the flags=1 for one on one in the prosystem.dat file and it runs correctly, as you said. Odd that they would default it to 0..

 

That is the odd part about the current state of the ProSystem emulator, it ignores cycles that would be consumed by Maria giving all possible cycles to the 6502. This appears to work most of the time due to the fact that games rely on VSYNC and Display List interrupts. However, after I reworked the cycle code and forced Maria to always be on I noticed a lot of games seem to be running at more normal speed and a lot of the graphical glitches have cleared up. Some examples that I have noted include:

 

Commando - The graphical glitches at the title screen don't appear anymore

Klax - Now runs at a more suitable speed (too fast before)

Midnight Mutants - Less graphical glitches

Ms. Pac-Man (and variants) - When the playfield is initially drawn it renders from the outside in (a subtle display effect)

One on One - Now runs at a more normal speed (too fast before)

Plutos - Less graphical glitches (some still appear though)

Summer Games - You can control the diver now (too fast before), no longer has minor graphical glitches

Tower Toppler - Now runs at a more normal speed (too fast before)

 

I am sure there are more examples, but these were fairly pronounced.

 

To me, the default should be to always have Maria Cycles and WSYNC enabled (as it is in the actual hardware). As I mentioned in a previous post, in the current code of ProSystem, the number of cycles being consumed was so great that it made a lot of games unplayable. Anyway, so I am thinking about swapping the meaning of the 0x1 flag for my Wii release. Meaning, Maria cycles are on by default and it can be disabled on a per cart basis. I also added the ability to override the Cart settings in the GUI so that you can quickly see the effect of switching the flags on/off.

 

Also, after my fixes for WSYNC, "Kung Fu Master" now works as it should (Atari Fuji Logo displays as it should at startup, and the game looks correct). So, I don't think any carts will ever use that flag (it seems very bad to ignore a WSYNC).

 

--Raz.

Edited by raz0red
Link to comment
Share on other sites

PAL versions of cartridges that support the HSC can cause some odd behavior in the high score screen (Dig Dug). So, I was thinking of adding an additional flag to the ProSystem.dat file to indicate which games to enable the cart for.

IMHO if the game looks for the high score cart (by looking at the "magic locations") it should find it no matter if its running in PAL or NTSC. Ideally the HSC ROM image should be fixed to run on either PAL/NTSC (as appropriate).

Link to comment
Share on other sites

IMHO if the game looks for the high score cart (by looking at the "magic locations") it should find it no matter if its running in PAL or NTSC. Ideally the HSC ROM image should be fixed to run on either PAL/NTSC (as appropriate).

 

Yeah, that is the way it is working now. I agree the HSC ROM image should be updated to support both.

 

Not sure what to say about Xenophobe though. It might be a bug in the emulator implementations (my changes to ProSystem and EMU7800), I will try to figure out what is going on later tonight.

 

I will just say it is annoying to play a different game and have your previous high scores wiped... :(

 

--Raz.

Edited by raz0red
Link to comment
Share on other sites

See if the following addresses are jumped to :-

 

0x3FEE - ??

0x3FF1 - ??

0x3FF4 - ??

 

They are entry points in the HSC ROM but I've not found any documentation on them so far. Have you checked the following thread?

 

http://www.atariage.com/forums/index.php?showtopic=142139

 

Its got my partially reverse engineered HSC ROM disassembly in it.

Link to comment
Share on other sites

See if the following addresses are jumped to :-

 

0x3FEE - ??

0x3FF1 - ??

0x3FF4 - ??

 

They are entry points in the HSC ROM but I've not found any documentation on them so far. Have you checked the following thread?

 

http://www.atariage.com/forums/index.php?showtopic=142139

 

Its got my partially reverse engineered HSC ROM disassembly in it.

 

Very cool, thanks for the great info.

 

I will add those locations to my standard debug output and report back later tonight.

 

I hadn't seen that thread yet, I will take a look and check out your disassembly.

 

Thanks for all the help.

 

--Raz.

Edited by raz0red
Link to comment
Share on other sites

Interesting... I set the flags=1 for one on one in the prosystem.dat file and it runs correctly, as you said. Odd that they would default it to 0..

 

That is the odd part about the current state of the ProSystem emulator, it ignores cycles that would be consumed by Maria giving all possible cycles to the 6502. This appears to work most of the time due to the fact that games rely on VSYNC and Display List interrupts. However, after I reworked the cycle code and forced Maria to always be on I noticed a lot of games seem to be running at more normal speed and a lot of the graphical glitches have cleared up. Some examples that I have noted include:

 

Commando - The graphical glitches at the title screen don't appear anymore

Klax - Now runs at a more suitable speed (too fast before)

Midnight Mutants - Less graphical glitches

Ms. Pac-Man (and variants) - When the playfield is initially drawn it renders from the outside in (a subtle display effect)

One on One - Now runs at a more normal speed (too fast before)

Plutos - Less graphical glitches (some still appear though)

Summer Games - You can control the diver now (too fast before), no longer has minor graphical glitches

Tower Toppler - Now runs at a more normal speed (too fast before)

 

I am sure there are more examples, but these were fairly pronounced.

 

To me, the default should be to always have Maria Cycles and WSYNC enabled (as it is in the actual hardware). As I mentioned in a previous post, in the current code of ProSystem, the number of cycles being consumed was so great that it made a lot of games unplayable. Anyway, so I am thinking about swapping the meaning of the 0x1 flag for my Wii release. Meaning, Maria cycles are on by default and it can be disabled on a per cart basis. I also added the ability to override the Cart settings in the GUI so that you can quickly see the effect of switching the flags on/off.

 

Also, after my fixes for WSYNC, "Kung Fu Master" now works as it should (Atari Fuji Logo displays as it should at startup, and the game looks correct). So, I don't think any carts will ever use that flag (it seems very bad to ignore a WSYNC).

 

--Raz.

Does the windows version of prosystem do the same things? They almost sound reverse of what they should be. But then I don't think I've used prosystem extensively. I just don't remember Kung Fu Master having issues.

 

Emu7800 is based off the MESS source so MESS should pretty much act the same. Oddly enough MESS does not play Xenophobe properly so I never tested the HSC on it. I had also found that Centipede will not initialize an HSC cart properly.

 

Just a feature request but I've noticed several of the Wii emu's have been adding SMB support lately. Which although, not needed as much for Atari files (because they are smaller). It would be nice. They use something called TinySMB? Also it'd be nice to be able to navigate the directories. I usually have my 7800 files split up but had to put them all in one directory.

 

Thanks for the great work!

Link to comment
Share on other sites

Does the windows version of prosystem do the same things? They almost sound reverse of what they should be. But then I don't think I've used prosystem extensively. I just don't remember Kung Fu Master having issues.

 

Yes, those are issues with the current Windows version of ProSystem. The reason Kung Fu Master works now is that it ignores WSYNCs (via the ProSystem.dat file). If you use the bios you will note the fuji logo doesn't have any colors, also during gameplay there are some horizontal stripes at the top of the game display. These are the result of ignoring WSYNC.

 

Emu7800 is based off the MESS source so MESS should pretty much act the same. Oddly enough MESS does not play Xenophobe properly so I never tested the HSC on it. I had also found that Centipede will not initialize an HSC cart properly.

 

Yeah, I had the same issue w/ EMU7800. However, I found that if I kept hammering on the fire button it would start once the intro sequence began...

 

Just a feature request but I've noticed several of the Wii emu's have been adding SMB support lately. Which although, not needed as much for Atari files (because they are smaller). It would be nice. They use something called TinySMB? Also it'd be nice to be able to navigate the directories. I usually have my 7800 files split up but had to put them all in one directory.

 

Yeah, the frontend (actually, for all my emulator ports) is just temporary. I already have the start on a Wii-based GUI w/ Wiimote IR support, etc. I probably won't get back to it until I am happy with the state of the emulators. Once I do resume work on it I will definitely add both of those features.

 

--Raz.

Edited by raz0red
Link to comment
Share on other sites

Just to correct what I said earlier

Centipede will not initialize an HSC cart properly
. I was referring to when the HSC cart contains no data I was unable to "initialize" it with Centipede under Mess.

 

What is is that xenophobe does that makes the screen so crazy in emu7800 aka mess? It plays but the screen jumps around all over the place!

 

ok so I set flags=2 in prosystem for windows and the atari logo displays correctly but then the screen itself is wrong, in particular the floor your character walks on. So you made some changes to the wii code that fix that little issue? I'm just trying to keep up with all this. I'm hoping it will give me some insight that I may be able to "transfer" over to mess.

 

Again, Thank you...

Edited by Shannon
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...