DCEmulation

The Dreamcast Homebrew Community Online
Back to main site
It is currently Fri Jul 25, 2014 6:03 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 64 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
PostPosted: Sun Jan 29, 2012 7:26 pm 
Offline
The Crabby Overlord
The Crabby Overlord
User avatar

Joined: Mon May 27, 2002 9:31 am
Posts: 4096
Yep. It was indeed the issue. Pretty easy to pick out when you are listening to it, if you know what to listen for. :wink: Being that I remember having the EXACT same bug when I first got an x86-based Mac, I know exactly where it was when I heard it. Can't forget that awful sound, not even if I try...

Here's a list of what was wrong, and how it got fixed:
Black Screen Issue - The problem was that the thread that emulation was running in relied on certain data being initialized before a certain point in its execution, and it wasn't being initialized by then on PPC (but was on x86). A classic race condition. Moved the initialization to before the thread was spawned, which fixed the problem.

Sound Issue - For some reason, even on big endian machines, Mac OS X assumes sound is in little endian byte order. Since I'm generating sound at runtime, its in the native endianness of the machine. On PowerPC, that would be big endian, so the flag needs to be set for that. Apple is nice enough to provide a constant that resolves to big endian on PPC, and little endian on x86, which is what I set to fix that.

Preferences Issue - This one was two mistakes. The first was that I forgot to retain a reference-counted Cocoa object that was autoreleased later on. Since I didn't retain it, when I went to use it later, the object had been autoreleased already, thus causing the crash. Second of all, I was overwriting the preferences with a blank slate after setting the initial preferences. Thus, creating new preferences had been broken the whole time on 0.1.9, at least if you did so by setting a button at first (and not playing with other things). Retaining the value and doing things in the right order fixed this one.


Top
 Profile  
 
PostPosted: Sun Jan 29, 2012 11:31 pm 
Offline
DCEmu Cool Newbie
DCEmu Cool Newbie

Joined: Mon Jan 16, 2012 9:04 pm
Posts: 16
Well, everything seems to work nicely! The sound is obviously a billion times better, and the preferences appear to be working properly. Thank you for the detailed explanations of the bugfixes, they help me to understand what's going on a bit better. It makes perfect sense that an endian-ness issue would cause what I was hearing.

Occasionally I'm seeing quirky behavior here or there -- I tried pausing during a MSX port (Maze of Galious), and it crashed the game, after which the controls mysteriously became unresponsive when I launched another game (Air Rescue). But a quick quit-and-relaunch fixed that.

BTW, do you think the SMS pause button might be mapped to something more comfortable, like the Return key? Or am I overlooking some way to reconfigure it? It gets used for gameplay in a few games like Streets of Rage, so it should probably have a one-key input option.

I'd love to see a release soon, but at least I can "roll my own" for now (and once again, thanks for continuing to support PPC and Tiger). OTOH, it'd be great to have a pre-built Dreamcast binary package... :mrgreen:

Oh, one more thing: I'm still getting this bug with Smurfs 2, despite the fact that it's marked as closed. I have three different SMS dumps and a GG dump, and every version of the game crashes, so I don't think it's just me. The crash happens even with a fresh prefs file, and with or without CrabEmu BIOS enabled.

I think the problem may be connected to the fact that CrabEmu is absolutely insisting on creating a SRAM file for the game (at least for the SMS versions), despite the fact that AFAIK it doesn't use one (it has a password system). Any ideas? BTW the SRAM file ends in .ces, is 32K, and is entirely made up of $00, and it's created as soon as I close the window.

EDIT: One more very minor problem: in Preferences > Settings, the checkboxes for enabling CrabEmu BIOS don't work properly. The SMS BIOS checkbox triggers the GG one, or vice versa.

EDIT #2: Another oddity I discovered: if you disable a PSG channel, and then open a different game, the settings are ignored -- the channel plays, IOW -- and you have to re-enable the channel's menu item before you can disable it. I can file a bug report for these if it'd be more helpful to do things that way.


Top
 Profile  
 
PostPosted: Mon Jan 30, 2012 5:17 am 
Offline
The Crabby Overlord
The Crabby Overlord
User avatar

Joined: Mon May 27, 2002 9:31 am
Posts: 4096
goldenband wrote:
Well, everything seems to work nicely! The sound is obviously a billion times better, and the preferences appear to be working properly. Thank you for the detailed explanations of the bugfixes, they help me to understand what's going on a bit better. It makes perfect sense that an endian-ness issue would cause what I was hearing.
No problem. Its always nice to have some idea of how things got fixed.

Quote:
Occasionally I'm seeing quirky behavior here or there -- I tried pausing during a MSX port (Maze of Galious), and it crashed the game, after which the controls mysteriously became unresponsive when I launched another game (Air Rescue). But a quick quit-and-relaunch fixed that.
Odd... No idea there at the moment.

Quote:
BTW, do you think the SMS pause button might be mapped to something more comfortable, like the Return key? Or am I overlooking some way to reconfigure it? It gets used for gameplay in a few games like Streets of Rage, so it should probably have a one-key input option.
It gets used for gameplay? Ugh... Leave it to these companies to do something so silly as using a button that is ON THE CONSOLE ITSELF in the playing of a game...

Quote:
I'd love to see a release soon, but at least I can "roll my own" for now (and once again, thanks for continuing to support PPC and Tiger). OTOH, it'd be great to have a pre-built Dreamcast binary package... :mrgreen:
Then stop finding bugs. :lol: Seriously though, I'm waiting on a few different things now that are blocking before a release.

Quote:
Oh, one more thing: I'm still getting this bug with Smurfs 2, despite the fact that it's marked as closed. I have three different SMS dumps and a GG dump, and every version of the game crashes, so I don't think it's just me. The crash happens even with a fresh prefs file, and with or without CrabEmu BIOS enabled.

I think the problem may be connected to the fact that CrabEmu is absolutely insisting on creating a SRAM file for the game (at least for the SMS versions), despite the fact that AFAIK it doesn't use one (it has a password system). Any ideas? BTW the SRAM file ends in .ces, is 32K, and is entirely made up of $00, and it's created as soon as I close the window.
Well, being that it doesn't seem to happen on my normal test-passes, I'm going to take a stab in the dark and assume its an endianness-related bug again. I'll have to look on my Mac Mini later on.

Quote:
EDIT: One more very minor problem: in Preferences > Settings, the checkboxes for enabling CrabEmu BIOS don't work properly. The SMS BIOS checkbox triggers the GG one, or vice versa.
Well that's a silly mistake, isn't it. Should be fixed when I do the next commit. Had a few things wired wrong in Interface Builder, apparently.

Quote:
EDIT #2: Another oddity I discovered: if you disable a PSG channel, and then open a different game, the settings are ignored -- the channel plays, IOW -- and you have to re-enable the channel's menu item before you can disable it. I can file a bug report for these if it'd be more helpful to do things that way.
Certain things get ignored sometimes... Like that. Remnants of how old a lot of the code of CrabEmu is (I originally started on CrabEmu when I was a freshman at the University I'm at... I'm now a 3rd year graduate student at the same university). :roll: Now that you pointed it out, I'll fix it.

That said, keeping the bugs here makes me more likely to notice them. Quite often, I don't see things on the SF.net tracker because it decides not to email me when someone adds a bug or whatnot. I should actually see and notice things here, on the other hand. :wink:

EDIT: Fixed the BIOS checkboxes and the enabled/disabled state of the SN76489 channels.

EDIT 2: I've at least partially fixed the Smurfs issue now. As expected, it was an endianness-related bug (in CrabZ80, when dealing with certain DD- and FD-prefixed opcodes that only operate on half of the IX or IY register). There's still something else broken with that game that is messing with sound (at least on Tiger on PPC -- it works fine on Lion on x86).

EDIT 3: Does sound work at all for you on Tiger on PPC? On the machine I'm testing it on, it doesn't seem to work at all for me, regardless of what game I try (or rather, at least with the two games I have tried)... I just get annoying screeching and other such fun things.

EDIT 4: Never mind, fixed that issue now too. :lol:


Top
 Profile  
 
PostPosted: Mon Jan 30, 2012 7:44 pm 
Offline
DCEmu Cool Newbie
DCEmu Cool Newbie

Joined: Mon Jan 16, 2012 9:04 pm
Posts: 16
BlueCrab wrote:
It gets used for gameplay? Ugh... Leave it to these companies to do something so silly as using a button that is ON THE CONSOLE ITSELF in the playing of a game...

Yeah, there are a few games that use it. Streets of Rage uses it for a special weapon, and at least 1-2 games use it for bringing up a status screen à la Zelda. I'm not sure of the others, but there are a few. Hey, at least it's not like the RCA Studio II, where the controllers are actually built into the console. :mrgreen:

EDIT: I found a list (non-comprehensive) with a few more: Golvellius, Wonder Boy III, Wonder Boy in Monster Land, and Zillion.

EDIT #2: And two more: Alex Kidd in Miracle World, Psycho Fox.

BlueCrab wrote:
Then stop finding bugs. :lol: Seriously though, I'm waiting on a few different things now that are blocking before a release.

Heh. Out of curiosity, what are the release-blocking things?

BlueCrab wrote:
That said, keeping the bugs here makes me more likely to notice them. Quite often, I don't see things on the SF.net tracker because it decides not to email me when someone adds a bug or whatnot. I should actually see and notice things here, on the other hand. :wink:

Excellent, glad this format is working for you. Certainly it's easier to go back and forth.

And thanks so much for the fixes. The Smurfs 2 issue seems to be resolved, and the BIOS toggle is working properly. The only thing that isn't fixed is the SN76489 channel enable/disable -- that's still doing more or less what it was before, I think? I tried trashing the prefs but it's still not working, i.e. not preserving the state of PSG channels between loads.


Top
 Profile  
 
PostPosted: Tue Jan 31, 2012 5:13 am 
Offline
The Crabby Overlord
The Crabby Overlord
User avatar

Joined: Mon May 27, 2002 9:31 am
Posts: 4096
goldenband wrote:
BlueCrab wrote:
Then stop finding bugs. :lol: Seriously though, I'm waiting on a few different things now that are blocking before a release.

Heh. Out of curiosity, what are the release-blocking things?
GUI artwork for the Dreamcast version and an OK from the guy who is working on the Linux version that everything's fine for a release.

Quote:
And thanks so much for the fixes. The Smurfs 2 issue seems to be resolved, and the BIOS toggle is working properly. The only thing that isn't fixed is the SN76489 channel enable/disable -- that's still doing more or less what it was before, I think? I tried trashing the prefs but it's still not working, i.e. not preserving the state of PSG channels between loads.
Do you mean between quitting and restarting the emulator, or just between loading different roms? If the former, I never actually made that save to the preferences file, so that explains that (I didn't figure it was necessary/useful to save it). If the latter, I know that it works fine when you have a game running and load a new rom while the old one is still running. Now that I think about it, it probably doesn't work if you close the window then open a new rom though.


Top
 Profile  
 
PostPosted: Tue Jan 31, 2012 8:22 am 
Offline
DCEmu Cool Newbie
DCEmu Cool Newbie

Joined: Mon Jan 16, 2012 9:04 pm
Posts: 16
BlueCrab wrote:
goldenband wrote:
[The only thing that isn't fixed is the SN76489 channel enable/disable -- that's still doing more or less what it was before, I think? I tried trashing the prefs but it's still not working, i.e. not preserving the state of PSG channels between loads.

Do you mean between quitting and restarting the emulator, or just between loading different roms? If the former, I never actually made that save to the preferences file, so that explains that (I didn't figure it was necessary/useful to save it). If the latter, I know that it works fine when you have a game running and load a new rom while the old one is still running. Now that I think about it, it probably doesn't work if you close the window then open a new rom though.

Aha, that's exactly what's happening: if I keep the window open when changing games, the channel status is preserved, but if I close the window, it's not. I don't think the PSG state necessarily needs to be saved when quitting the emulator, but it'd be nice to have it maintained while the emulator itself is loaded. In this case, I was comparing the way that Cave Dude (from 4 Pak All Action) and Toto World 3 use the PSG channels, and was closing the window between loads.

Who's doing the GUI stuff for the DC version, BTW? Tell 'em I'll buy them a beer if they get it finished up. :mrgreen:

EDIT: Looks like r94 fixes the PSG issue? I'll have to wait until later today to build it, but great if so. :grin:


Top
 Profile  
 
PostPosted: Tue Jan 31, 2012 11:03 am 
Offline
The Crabby Overlord
The Crabby Overlord
User avatar

Joined: Mon May 27, 2002 9:31 am
Posts: 4096
goldenband wrote:
EDIT: Looks like r94 fixes the PSG issue? I'll have to wait until later today to build it, but great if so. :grin:
Yep, that it does.

I'm also probably going to finish up with this large-scale rework of the preferences system in the Mac OS X version pretty soon... Should make things work a little bit saner/safer/etc. :lol:

EDIT: There... Done with that, including mapping whatever you configure as the Game Gear start button to the SMS pause button.

EDIT 2: Fixed the control issue with playing Maze of Galious then Air Rescue. In theory, Air Rescue may well have broke any time that a BIOS wasn't in use, as it expected the value at address 0xC000 to be what it should set in port 3E, and blindly used it as such, without making sure that I/O was enabled. Since I'm actually emulating that port properly, and Maze of Galious put something there that didn't have the bits set properly to have I/O ports enabled, Air Rescue disabled the I/O ports when it used the value at 0xC000.


Top
 Profile  
 
PostPosted: Wed Feb 01, 2012 12:29 am 
Offline
DCEmu Cool Newbie
DCEmu Cool Newbie

Joined: Mon Jan 16, 2012 9:04 pm
Posts: 16
BlueCrab wrote:
EDIT: There... Done with that, including mapping whatever you configure as the Game Gear start button to the SMS pause button.

Uh-oh, I'm now getting crashes with r96 every time I try to change the keyboard input settings in Tiger, including the GG start/SMS pause. The crash happens as soon as I've chosen a key, right after the keyboard graphic disappears, and is happening with or without a pre-existing net.ljsdcdev.CrabEmu.plist file.

Did something go wrong? r92 doesn't display this behavior. I can double-check tomorrow whether this is happening in Leopard too -- I only ran a brief test of the PSG while in Leopard, and didn't mess around with SMS pause.

BlueCrab wrote:
EDIT 2: Fixed the control issue with playing Maze of Galious then Air Rescue. In theory, Air Rescue may well have broke any time that a BIOS wasn't in use, as it expected the value at address 0xC000 to be what it should set in port 3E, and blindly used it as such, without making sure that I/O was enabled. Since I'm actually emulating that port properly, and Maze of Galious put something there that didn't have the bits set properly to have I/O ports enabled, Air Rescue disabled the I/O ports when it used the value at 0xC000.

Huh, very interesting. I'm glad I mentioned which games caused the issue!


Top
 Profile  
 
PostPosted: Wed Feb 01, 2012 6:28 am 
Offline
The Crabby Overlord
The Crabby Overlord
User avatar

Joined: Mon May 27, 2002 9:31 am
Posts: 4096
goldenband wrote:
BlueCrab wrote:
EDIT: There... Done with that, including mapping whatever you configure as the Game Gear start button to the SMS pause button.

Uh-oh, I'm now getting crashes with r96 every time I try to change the keyboard input settings in Tiger, including the GG start/SMS pause. The crash happens as soon as I've chosen a key, right after the keyboard graphic disappears, and is happening with or without a pre-existing net.ljsdcdev.CrabEmu.plist file.

Did something go wrong? r92 doesn't display this behavior. I can double-check tomorrow whether this is happening in Leopard too -- I only ran a brief test of the PSG while in Leopard, and didn't mess around with SMS pause.
Yep... I did something stupid there. I think it should be fixed now.


Top
 Profile  
 
PostPosted: Wed Feb 01, 2012 11:07 pm 
Offline
DCEmu Cool Newbie
DCEmu Cool Newbie

Joined: Mon Jan 16, 2012 9:04 pm
Posts: 16
It seems to work properly now, thanks!


Top
 Profile  
 
PostPosted: Fri Feb 03, 2012 3:21 pm 
Offline
The Crabby Overlord
The Crabby Overlord
User avatar

Joined: Mon May 27, 2002 9:31 am
Posts: 4096
So... Hopefully I didn't break anything with my latest commit. :wink:

Quite a bit of new stuff in it, after all. Only fitting for a milestone like hitting r100 of the SVN. :P


Top
 Profile  
 
PostPosted: Fri Feb 03, 2012 4:13 pm 
Offline
DCEmu Cool Newbie
DCEmu Cool Newbie

Joined: Mon Jan 16, 2012 9:04 pm
Posts: 16
Ooh, CV support! Very nice, especially given the rather grim state of CV emulation on OS X (at least on PPC). I look forward to checking it out. :mrgreen:


Top
 Profile  
 
PostPosted: Fri Feb 03, 2012 4:59 pm 
Offline
The Crabby Overlord
The Crabby Overlord
User avatar

Joined: Mon May 27, 2002 9:31 am
Posts: 4096
Just a few things to note about CV support for now...

First, there's no controller support just yet. Basically, all you can do right now is load up the BIOS and games through it.

Second, you need a BIOS Rom configured to use CV at all. The option is in the preferences.

Third, there is no Adam support at all right now. I don't know if/when I'll work on that.

Oh, I almost forgot to mention... Currently only the Mac version has any ColecoVision support at all. That will change soon though.

EDIT: ColecoVision support is now extended to the Dreamcast version (although controls don't work there just yet). Oh, and on that same subject, the Mac version does have controls for ColecoVision now, and you can edit them in the Preferences dialog (no support for gamepads/joysticks just yet though).


Top
 Profile  
 
PostPosted: Wed Feb 08, 2012 9:22 am 
Offline
The Crabby Overlord
The Crabby Overlord
User avatar

Joined: Mon May 27, 2002 9:31 am
Posts: 4096
ColecoVision support for the Dreamcast port is pretty much done now since controls were committed in r118 (a few minutes ago). :grin:

On a related note, I apparently fail at Galaxian... :?


Top
 Profile  
 
PostPosted: Thu Feb 09, 2012 2:25 am 
Online
Moderator
Moderator
User avatar

Joined: Wed Aug 27, 2003 10:16 pm
Posts: 5762
Location: DCEvolution.net
Woohoo!

Btw: I wonder if the Korean mappers found in SMSPower's recent releases are supported ?

_________________
Insane homebrew collector.


Top
 Profile  
 
PostPosted: Thu Feb 09, 2012 5:10 am 
Offline
The Crabby Overlord
The Crabby Overlord
User avatar

Joined: Mon May 27, 2002 9:31 am
Posts: 4096
Christuserloeser wrote:
Woohoo!

Btw: I wonder if the Korean mappers found in SMSPower's recent releases are supported ?
All of the mappers that I'm aware of are supported. Here's the full list:
  • Sega mapper
  • Codemasters mapper (including the variant in Ernie Els Golf)
  • 93C46 EEPROM "mapper"
  • The Castle mapper
  • Terebi Oekaki "mapper" -- note that the drawing functionality does not function on the Dreamcast (it does on Linux and Mac OS X).
  • Korean mapper
  • Korean (MSX variant) mapper
  • 4 PAK All Action mapper

EDIT: If you mean the most recent ones as of this point, there's three games in that list that don't work with the code in the repository as it stands. I have two of them fixed in my tree (thanks to looking at the changelog of Meka to see how they were fixed there). The third is a bit of mystery at the moment. I think most (if not all) of those games either didn't use a mapper or were happy with the default "Sega" mapper.

EDIT 2: All three are fixed as of r119.


Top
 Profile  
 
PostPosted: Fri Feb 10, 2012 3:47 pm 
Online
Moderator
Moderator
User avatar

Joined: Wed Aug 27, 2003 10:16 pm
Posts: 5762
Location: DCEvolution.net
Excellent work! :thumbup:

_________________
Insane homebrew collector.


Top
 Profile  
 
PostPosted: Sat Feb 11, 2012 10:14 pm 
Offline
DCEmu Cool Newbie
DCEmu Cool Newbie

Joined: Mon Jan 16, 2012 9:04 pm
Posts: 16
Just built r119, and it's working very well on PPC under both Tiger and Leopard! I tried a couple CV games and they worked with no problems at all (once I enabled a BIOS file). The new changes to the keyboard config UI are great, a huge improvement.

Two tiny issues -- first, on the SMS front: of the new Korean dumps that had been causing problems, Xyzolog worked right away, but I had to disable the CrabEmu BIOS to get Ali Baba and Block Hole to work. I'm not sure if that's expected behavior, but it's what I saw. Easy workaround on my laptop, but this could be an issue on the Dreamcast version if there's still no way to toggle BIOS support on and off -- not sure if that's still the case?

Also, CrabEmu crashed hard (in Leopard) when I accidentally told it to open a savestate file from a different emulator instead of a CV ROM. It took a full 30 seconds for Force Quit to take effect. Perhaps there's a way to curtail that particular freakout?

Otherwise, this is really looking terrific. Once the Dreamcast build is ready for a release (is it possible to build it under PPC?), I'm looking forward to playing some CV on my DC!


Top
 Profile  
 
PostPosted: Sat Feb 11, 2012 10:53 pm 
Offline
The Crabby Overlord
The Crabby Overlord
User avatar

Joined: Mon May 27, 2002 9:31 am
Posts: 4096
goldenband wrote:
Just built r119, and it's working very well on PPC under both Tiger and Leopard! I tried a couple CV games and they worked with no problems at all (once I enabled a BIOS file). The new changes to the keyboard config UI are great, a huge improvement.
That was all back-ported from Yabause (I'm responsible for the Cocoa-based Mac version of that too -- that's x86 only though, as it requires 10.6).

Quote:
Two tiny issues -- first, on the SMS front: of the new Korean dumps that had been causing problems, Xyzolog worked right away, but I had to disable the CrabEmu BIOS to get Ali Baba and Block Hole to work. I'm not sure if that's expected behavior, but it's what I saw. Easy workaround on my laptop, but this could be an issue on the Dreamcast version if there's still no way to toggle BIOS support on and off -- not sure if that's still the case?
That's most definitely related to the issue I had to write code to fix in the core... Hrm, I suppose I can mess around with stuff and see what I can do about it.

Quote:
Also, CrabEmu crashed hard (in Leopard) when I accidentally told it to open a savestate file from a different emulator instead of a CV ROM. It took a full 30 seconds for Force Quit to take effect. Perhaps there's a way to curtail that particular freakout?
Uh... Well, there's little I can do to make sure something is a rom, unfortunately. Its pretty much impossible to test a file to see if its a rom short of maintaining checksums of every known game (which would be difficult and error prone anyway).

Quote:
Otherwise, this is really looking terrific. Once the Dreamcast build is ready for a release (is it possible to build it under PPC?), I'm looking forward to playing some CV on my DC!
It should be possible to build under PPC. Last I checked, the toolchain builds fine on PPC, but that has been a while.


Top
 Profile  
 
PostPosted: Sun Feb 12, 2012 7:35 am 
Online
Moderator
Moderator
User avatar

Joined: Wed Aug 27, 2003 10:16 pm
Posts: 5762
Location: DCEvolution.net
goldenband wrote:
Who's doing the GUI stuff for the DC version, BTW? Tell 'em I'll buy them a beer if they get it finished up. :mrgreen:

I think I remember that fixing the GUI was a matter of simply converting the PNG files to 256 colors, 8bpp or something like that. I have lost my Dreamcast stuff in a hard disk drive crash last year (trying to get it fixed asap but it's rather costly) so I can't really check what I did, but it was something that was easy to fix.

_________________
Insane homebrew collector.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 64 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group