GenesisPlus DC DL's + Discussion

This forum is for discussion pertaining to homebrew and indie software for the Dreamcast, such as homebrew games, emulators/interpreters, and other homebrew software/applications. Porting requests and developmental ideas are not to be made here; you can make those here. If you need any help burning discs for homebrew software, this is the place to ask as well.
Locked
DcSteve
Modder Of Rage
Modder Of Rage
Posts: 805
https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
Joined: Mon Mar 18, 2002 12:41 pm
Location: Midwest
Has thanked: 0
Been thanked: 0
Contact:

GenesisPlus DC DL's + Discussion

Post by DcSteve »

A long while ago, Blackaura released the source to genesis plus DC PVR 5. The latest compiled bin that was released to the public was PVR 3. Today, I requested chui to compile a bin of PVR 5, and he did it successfully! I scrambled the bin for selfboot. You can get it here> http://dev.dcemulation.org/gen_pvr5.zip

and here is the source and info posted by blackaura

Posted: Sat Jun 26, 2004 2:50 am Post subject:

--------------------------------------------------------------------------------

I give up. I just can't get the sound code right...

http://files.frashii.com/~sp00nz/Doom/f ... -5.tar.bz2

Here's what's wrong with it:
- Everything's output to the center sound channel
- The sound mixing is completely wrong
- Only one of the two FM channels is playing. For some reason, channel 0 is either not playing, or the sound data isn't being copied.
- The sound keeps screwing up. Either the sound output keeps catching up with the playback, or the playback is catching up with the sound output. I have no way to tell which is happening

Basically, I can't debug it. If I can't debug it, I can't fix it. I always have this problem with sound streaming stuff. I don't know why, but I can never get sound streaming to work properly, mostly because I can't see what's wrong with it.
Last edited by DcSteve on Wed Dec 08, 2004 1:27 pm, edited 3 times in total.
BlackAura
DC Developer
DC Developer
Posts: 9951
Joined: Sun Dec 30, 2001 9:02 am
Has thanked: 0
Been thanked: 1 time

Post by BlackAura »

Don't bother with it. It's basically the same as the last preview, but the sound support is even worse.
DcSteve
Modder Of Rage
Modder Of Rage
Posts: 805
Joined: Mon Mar 18, 2002 12:41 pm
Location: Midwest
Has thanked: 0
Been thanked: 0
Contact:

Post by DcSteve »

chui also said he will try to intergrate fox's core in this... the idea behind releasing a compiled pvr5 was for devvers and curious kids to give a quick test.. and see if someone can help out.. also mekanaizer JUST compiled this 2 and said he made some slight changes to the source for speed. This is untested...

http://mekanaizer.planetaclix.pt/files/gpdc-pvr5.zip
Check out the beats of rage community at http://borrevolution.vg-network.com/
User avatar
Quzar
Dream Coder
Dream Coder
Posts: 7497
Joined: Wed Jul 31, 2002 12:14 am
Location: Miami, FL
Has thanked: 4 times
Been thanked: 9 times
Contact:

Post by Quzar »

if BA had thought ti was worthy of people using, he would have released a compiled version himself. creating a bunch of new source branch offs isnt a solution.
"When you post fewer lines of text than your signature, consider not posting at all." - A Wise Man
DcSteve
Modder Of Rage
Modder Of Rage
Posts: 805
Joined: Mon Mar 18, 2002 12:41 pm
Location: Midwest
Has thanked: 0
Been thanked: 0
Contact:

Post by DcSteve »

he wouldnt have compiled it himself, because he didnt release compiles of the last good version (PVR 3) himself=-he didnt release the last compiled versions, other people did.. and "creating a bunch of branch offs" CAN help find solutions depending on who is do them...
impact135
Insane DCEmu
Insane DCEmu
Posts: 220
Joined: Mon Nov 25, 2002 3:32 am
Has thanked: 0
Been thanked: 0

Post by impact135 »

hmm if even a dc dever says its not even worth burning ..

does it change anything? like the grahpic glitches ... anything??

if its just like the other one then is there any point in burning it or should i just stick to v4?
BlackAura
DC Developer
DC Developer
Posts: 9951
Joined: Sun Dec 30, 2001 9:02 am
Has thanked: 0
Been thanked: 1 time

Post by BlackAura »

It's actually the same as the last "preview" release. Same graphics code, same CPU emulator... The only difference is that I'd been playing around with the sound code. It skips less, but it sounds far, far worse (instead of skipping sometimes, it goes noisy for five seconds, every ten seconds).
impact135
Insane DCEmu
Insane DCEmu
Posts: 220
Joined: Mon Nov 25, 2002 3:32 am
Has thanked: 0
Been thanked: 0

Post by impact135 »

if the only thing that got changed was the sound and by what your saying its not any better i think ill skip this release..

why did the dude release this version if thers no improvement?
User avatar
Christuserloeser
Moderator
Moderator
Posts: 5948
Joined: Thu Aug 28, 2003 12:16 am
Location: DCEvolution.net
Has thanked: 10 times
Been thanked: 0
Contact:

Post by Christuserloeser »

BlackAura has not released any of his GenesisPlus PVR -WIP- versions by himself. A different bunch of people compiled the sources and released the plain bin files to the public without documentation, credits etc, which prevented BlackAura from creating a real public beta release, which he certainly intended to do...
According to BlackArua (who programmed it), this version is a sound test source release for others to help him out but it wasn't meant for the general public. :roll:

@DCSteve: It would be kind if you'd get in contact with the people involved (BlackAura, Warmtoe) before you ask others (Chui) to spend their time on compiling more-or-less useless bins out of source releases that were meant for developing only.
Though I am not uninterested in seeing FAME SH4 working in GDPC PVR, I know that BlackAura also works on it - with the assistance of the Fame creator fox68k!

Anyway, afaik this won't prevent the sound from skipping (e.g. GDPC PVR Preview v3), as the sound skipping problems occur due to an frame rendering issue with the PVR code, -not- with Stef D's C68K CPU emulator...

@BlackAura: An idea would be to release an official Version 2 of GenesisPlusDC, that uses the old software renderer from the official Version 1, Fox68k's FAME CPU emulator, Stef D's basic sound code, the nice Nester6-like GUI and menu themeing (by Politoe) from Version 1 and that damn slow Z80 emu, GP currently uses.

It would be a good thing to have a perfectly working Genesis Emu for DC as a preview for the final PVR release, that also could have VMU support (with compression) as an additional bonus feature over Version 2 :D

Maybe that would satisfy some people (like me :lol: ) and lifts up some of the pressure that's in the air :o

Greetings,


Chris
Insane homebrew collector.
BlackAura
DC Developer
DC Developer
Posts: 9951
Joined: Sun Dec 30, 2001 9:02 am
Has thanked: 0
Been thanked: 1 time

Post by BlackAura »

Anyway, afaik this won't prevent the sound from skipping (e.g. GDPC PVR Preview v3), as the sound skipping problems occur due to an frame rendering issue with the PVR code, -not- with Stef D's C68K CPU emulator...
Not quite...

It's a combination of two things. First, the sound code naively assumes that everything is running along nicely at 60FPS, and that the sound hardware is consuming samples at the same rate that it's providing them. Aside from the buffering issue (sound lagging by up to a second), this would work if the assumptions it makes were true.

Firstly, the DC's sound hardware isn't consuming samples at the same rate the emulator is providing them, even if it's running at 60FPS. That means that the sound code needs to be able to adapt the number of samples generated per frame, so that it generates the correct number of samples to feed the sound hardware.

Second, the emulator is almost fast enough to run at 60FPS with sound, but not quite. Occasionally, a frame takes longer that 1/60th of a second to render, and because of the way the rendering works, that frame takes 1/30th of a second to render. The sound code doesn't take this into account at all.

Eventually, you get to a point where there just aren't any samples left to send to the sound hardware, so it just re-uses left over data from a while ago, causing the sound skipping.

Neither of those should be a problem, if the sound code is able to adapt to changing framerates correctly. Ideally, we should be able to generate the required number of sound samples every frame, even if they deviate from what we expected by a little bit (if you're running at 60FPS) or a lot (if you're running at a slower speed). DreamSNES and Super Famicast can do this easily, because that's how their sound systems have always worked. Genesis Plus, on the other hand, needs to generate sound samples during the frame emulation, because of the way the sound hardware works. That makes things a lot more tricky.

The experimental sound code in the source above was an attempt to do what DreamSNES or Super Famicast do. I stripped out all the sound generating code, and attempted to generate the required samples at the end of each frame, based on how many samples had been played since the last frame.

The problem is that it suffers from a more subtle version of the same problem. Basically, the emulator is generating samples at a different rate than the sound hardware is producing them. The occasional FPS changes don't make any difference. However, since the sound code is written slightly differently, two things can go wrong. Firstly, we can generate too many samples, and end up wrapping right around the sound buffer to the point where the sound hardware is reading samples, causing a terrible noise. Secondly, we can generate too few samples, causing the playback position to catch up to the writing position, and again creating the same terrible noise.

It has a whole different set of issues, which are a lot less obvious. It doesn't have the lag, and it's not as sensitive to framerate changes, but it still has some timing issues. It's also not the best way to handle it, because it's still rather inefficient, and has some issues with the DMA code as well. I think I could probably get it working correctly if I limited the output to mono only, but I'd rather not do that if I can avoid it.

I really need to add some kind of monitoring system into the emulator, so I can monitor the state of the sound (and video) emulation, including internal states, buffer status, and all that garbage.

Oh yeah... Don't bother changing the rendering code. It needs a rewrite anyway, because I made quite a few mistakes in the first attempt (it was just an experiment after all - I never intended to release it at all), which I think I can fix now I know what I'm doing.
User avatar
Quzar
Dream Coder
Dream Coder
Posts: 7497
Joined: Wed Jul 31, 2002 12:14 am
Location: Miami, FL
Has thanked: 4 times
Been thanked: 9 times
Contact:

Post by Quzar »

Christuserloeser wrote:
@BlackAura: An idea would be to release an official Version 2 of GenesisPlusDC, that uses the old software renderer from the official Version 1, Fox68k's FAME CPU emulator, Stef D's basic sound code, the nice Nester6-like GUI and menu themeing (by Politoe) from Version 1 and that damn slow Z80 emu, GP currently uses.
only a one problem with this: BA cant get FAME to work in GP and even if he did there is no way of knowing wether or not the SH4 version works at all, the only tests done were a few simple asm benchmarks.
"When you post fewer lines of text than your signature, consider not posting at all." - A Wise Man
User avatar
Christuserloeser
Moderator
Moderator
Posts: 5948
Joined: Thu Aug 28, 2003 12:16 am
Location: DCEvolution.net
Has thanked: 10 times
Been thanked: 0
Contact:

Post by Christuserloeser »

BlackAura wrote:[...]I think I could probably get it working correctly if I limited the output to mono only, but I'd rather not do that if I can avoid it.
I see where you are aiming at :D
I really need to add some kind of monitoring system into the emulator, so I can monitor the state of the sound (and video) emulation, including internal states, buffer status, and all that garbage.
IMO that's a brilliant idea!
BlackAura wrote:Oh yeah... Don't bother changing the rendering code. It needs a rewrite anyway, because I made quite a few mistakes in the first attempt (it was just an experiment after all - I never intended to release it at all), which I think I can fix now I know what I'm doing.
That's so unbelievable great to hear! :worship:

Just to get it out of the way, I am no devver! - I don't know how to update GPDCv1's source with FAME SH4, Stef's sound code - or the PVR code :o

I just thought, that asking you this, would take away a bit of the pressure and gives you some time to finish the work on the PVR code.
Quzar wrote:only a one problem with this: BA cant get FAME to work in GP and even if he did there is no way of knowing wether or not the SH4 version works at all, the only tests done were a few simple asm benchmarks.
Oh, I see :|
Insane homebrew collector.
ethoscapade
Insane DCEmu
Insane DCEmu
Posts: 280
Joined: Wed Mar 17, 2004 4:45 pm
Has thanked: 0
Been thanked: 0

Post by ethoscapade »

uh, i hate to say it, but i'm all for that mono-only version if it doesn't skip.

all for it. i can't stress that enough. i don't need to be immersed in audio heaven when i'm playing sonic. i do need to hear the ring noise within a couple seconds of when i pick up a ring.

hell, i use dreamSNES in mono in exchange for one or two FPS.
User avatar
MetaFox
Adventure Gamer
Adventure Gamer
Posts: 2818
Joined: Wed Oct 17, 2001 7:44 pm
Has thanked: 0
Been thanked: 12 times
Contact:

Post by MetaFox »

Christuserloeser wrote:BlackAura has not released any of his GenesisPlus PVR -WIP- versions by himself. A different bunch of people compiled the sources and released the plain bin files to the public without documentation, credits etc, which prevented BlackAura from creating a real public beta release, which he certainly intended to do...
According to BlackArua (who programmed it), this version is a sound test source release for others to help him out but it wasn't meant for the general public. :roll:
No. Will Sams and I compiled the releases, and BlackAura was alright with that.

The reason they didn't contain any documentation is because they were always meant to be WIP releases. They were just compiled sourcecode, the same as any "CVS build" or "daily build" you might find for ScummVM for Dreamcast, FreeSCI for Dreamcast, etc.

The reason we never compiled the 4th and 5th source releases is because BlackAura wasn't happy with them, and didn't want them compiled and released to the public.
User avatar
Clessy
DCEmu Super Poster
DCEmu Super Poster
Posts: 1327
Joined: Wed Oct 13, 2004 11:12 am
Has thanked: 0
Been thanked: 0

Post by Clessy »

ethoscapade wrote:uh, i hate to say it, but i'm all for that mono-only version if it doesn't skip.

all for it. i can't stress that enough. i don't need to be immersed in audio heaven when i'm playing sonic. i do need to hear the ring noise within a couple seconds of when i pick up a ring.

hell, i use dreamSNES in mono in exchange for one or two FPS.
I'm also totally fine with this also. Syned sound is much better than broken sound. As long as its a high quality mono output. Also is low pass filters in cube interpolation able to be done. It really makes music sound so much better in zsnes.
SE! SE! SE! Believe the hype!
BlackAura
DC Developer
DC Developer
Posts: 9951
Joined: Sun Dec 30, 2001 9:02 am
Has thanked: 0
Been thanked: 1 time

Post by BlackAura »

Also is low pass filters in cube interpolation able to be done. It really makes music sound so much better in zsnes.
A SNES has different sound hardware. Doing filtering or interpolation on the sound doesn't make any sense on a MegaDrive, because we're doing FM synthesis, not sample playback. For one, there's nothing to interpolate...
impact135
Insane DCEmu
Insane DCEmu
Posts: 220
Joined: Mon Nov 25, 2002 3:32 am
Has thanked: 0
Been thanked: 0

Post by impact135 »

the genesis 1 is mono only anyways so you wouldnt really be chaging a whole lot making it mono only. Not that i want mono.. of course i DONT .. but im just saying.. the genesis 1 model only has mono sound.. it kind of baffles the mind why would it be mono only?

I have also noticed the master system and nes and atari 7800 are ALL mono... what gives? i just wanted to know because i havent really noticed this but arnt the emulators of all these consoles in sterio?

of course when i bought these consoles and played them the most i really didnt notice the mono sound but now i do.

I have also noticed that a lot of my snes games have an option in the option menu of those games to make the sound mono or sterio.. my question is why did they even have an option for mono in the first place?

I had a mono tv back then.. but im sure the newer tvs back then were in sterio right? mono tv.. *shudders* heh
User avatar
Quzar
Dream Coder
Dream Coder
Posts: 7497
Joined: Wed Jul 31, 2002 12:14 am
Location: Miami, FL
Has thanked: 4 times
Been thanked: 9 times
Contact:

Post by Quzar »

Im pretty sure that the genesis is stereo internally, but only had mono outputs.
"When you post fewer lines of text than your signature, consider not posting at all." - A Wise Man
BlackAura
DC Developer
DC Developer
Posts: 9951
Joined: Sun Dec 30, 2001 9:02 am
Has thanked: 0
Been thanked: 1 time

Post by BlackAura »

The v1 MegaDrive / Genesis consoles did have stereo output, but only from the headphone socket. The mono signal was sent to the A/V out, and the stereo signal was sent to the headphone socket. On the v2 systems (like the one I have), the stereo signal was sent out the A/V output as well, so you get stereo sound out of it.

None of the older consoles had the ability to generate stereo sound of any kind. Some NES emulators do fake stereo sound, by putting two of the four sound channels on each speaker, but that wasn't present in the original console.
DcSteve
Modder Of Rage
Modder Of Rage
Posts: 805
Joined: Mon Mar 18, 2002 12:41 pm
Location: Midwest
Has thanked: 0
Been thanked: 0
Contact:

Post by DcSteve »

good news, mekanaizer may have fixed the sound bug! So no more looping. I have been testing his version for awhile and found very little sound glitching that lasts a few secs in some games but wayyyyy better than pvr3. I will test it more before anything is put out...
Locked