beta version of CZ80 released :)
-
- Insane DCEmu
- Posts: 280
- https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
- Joined: Wed Mar 17, 2004 4:45 pm
- Has thanked: 0
- Been thanked: 0
-
- Somewhat Dumb Knight
- Posts: 3653
- Joined: Tue Oct 12, 2004 2:26 pm
- Has thanked: 0
- Been thanked: 0
I think I have that rom, here is a link to it.
http://www.darksavant0.com/files/rudxmacard.ton
YAY, more emulators!
http://www.darksavant0.com/files/rudxmacard.ton
YAY, more emulators!
-
- DCEmu Ultra Poster
- Posts: 1754
- Joined: Wed Jul 17, 2002 11:25 am
- Has thanked: 0
- Been thanked: 0
Well, the Zilog chip was certainly superior in many ways to the 8080 is was compatible with. But in the next era of chips, they screwed up. So the Z80 continued to see new versions in more and more focused enviroments, but there was no popular successor. Heck, at one point they even had plans to make an x86 compatible chip as well, but they of course chickened out because they as a company preferred floundering.
Also, I can't believe nobody mentioned GB and GBC when talking about Z80. While they may not have succeeded with Z800 or whatever they called their planned successor chip, they did manage to get the good old Z80 to be very power efficient. My TI-83 lasts for many hours on those AAAs.
Also, I can't believe nobody mentioned GB and GBC when talking about Z80. While they may not have succeeded with Z800 or whatever they called their planned successor chip, they did manage to get the good old Z80 to be very power efficient. My TI-83 lasts for many hours on those AAAs.
If you have twenty monkeys,
banging randomly on typewriters,
they will in twenty minutes produce the complete source code to World of Warcraft.
banging randomly on typewriters,
they will in twenty minutes produce the complete source code to World of Warcraft.
- Untamed
- Psychotic DCEmu
- Posts: 672
- Joined: Sat Jan 10, 2004 5:28 am
- Location: London, England
- Has thanked: 0
- Been thanked: 0
GPF wrote:Thats just what we need people trading in musical xmas/birthday rom warezUntamed wrote:Hawq wrote:Dont forget watches & musical xmas/bday cards, the Z80 just wont die ever it seems
Let's emulate musical bday cards on the Dreamcast!
Hey does anybody have the new Rudolph xmas card rom ? lol
http://www.cardwarez.tk
...
If only that site were real.
"Ignorance can be cured, stupidity cannot."
Roofus wrote:Gay marriage and donkey rape are the same thing. Duh.
- Stef.D
- DCEmu Respected
- Posts: 114
- Joined: Wed Oct 15, 2003 1:46 am
- Has thanked: 0
- Been thanked: 0
- Contact:
I was going to post that on DcEmu.co.uk forum, but site is down for now.
I quickly set up an autoframe skip feature for Genesis Plus.
I'm even surprised i never did it before, it took me about 2 mn to do it (it worked on first attempt). Actually all was already here : a function to know where is the current read position in sound buffer, streaming sound etc ...
I modified about 10 lines of code to get it running.
Code is a bit ugly, but it was just a test ... and it worked directly almost perfectly
I give only the sources since anyway with my built, autoframe skip make Genesis Plus almost unplayable because we have something as 3-4 FPS ! Software renderer is too slow, and seems that sound code is not nice too.
BlackAura> I mainly modified the snd_stream_poll function which now return the number of samples still required to fill sound buffer. Beside that, i compare this number with the sound buffer size for 1 frame (42000/60 for 42 Khz)... if it's greater then i do a frame skip (no VDP display) else i do complete frame render.... simple but efficient.
Now sound code need to be reworked and optimised. I remember i did that in rush just to get stuff working... but that's not optimised at all.
You can download my last Genesis Plus DC sources here :
http://gens.consolemul.com/download/GenPlus_DC.zip
I quickly set up an autoframe skip feature for Genesis Plus.
I'm even surprised i never did it before, it took me about 2 mn to do it (it worked on first attempt). Actually all was already here : a function to know where is the current read position in sound buffer, streaming sound etc ...
I modified about 10 lines of code to get it running.
Code is a bit ugly, but it was just a test ... and it worked directly almost perfectly
I give only the sources since anyway with my built, autoframe skip make Genesis Plus almost unplayable because we have something as 3-4 FPS ! Software renderer is too slow, and seems that sound code is not nice too.
BlackAura> I mainly modified the snd_stream_poll function which now return the number of samples still required to fill sound buffer. Beside that, i compare this number with the sound buffer size for 1 frame (42000/60 for 42 Khz)... if it's greater then i do a frame skip (no VDP display) else i do complete frame render.... simple but efficient.
Now sound code need to be reworked and optimised. I remember i did that in rush just to get stuff working... but that's not optimised at all.
You can download my last Genesis Plus DC sources here :
http://gens.consolemul.com/download/GenPlus_DC.zip
-
- DC Developer
- Posts: 9951
- Joined: Sun Dec 30, 2001 9:02 am
- Has thanked: 0
- Been thanked: 1 time
Ooooh... Neat.
Well, this is a bit simpler than what I had in mind. For some reason, I didn't think of using the sound output to control the emulator. Duh...
Assuming it works correctly (I'll throw it into my copy, play a few games, and see if it blows up or not), there's really only one thing left to do to get it working properly - decrease the size of the buffer to reduce the sound delay.
As for optimizing it, off the top of my head...
The way I had the system running in a PC test version of Genesis Plus was basically running the DAC emulation / FM timers each scanline, and then running the PSG and FM synths for an entire frame of audio at once, at the end of the frame. Probably not the most accurate way to do it (it'll break at least one game), but it seems to work well enough.
Well, this is a bit simpler than what I had in mind. For some reason, I didn't think of using the sound output to control the emulator. Duh...
Assuming it works correctly (I'll throw it into my copy, play a few games, and see if it blows up or not), there's really only one thing left to do to get it working properly - decrease the size of the buffer to reduce the sound delay.
As for optimizing it, off the top of my head...
- Remove the mixing code in GP that mixes the two mono buffers into a single stereo buffer
- Remove the unmixing code in the sound driver that unmixes a single stereo buffer into two mono buffers
- Use DMA to transfer the sound data directly from the buffers
- Find places where we're needlessly copying sound data, and put a stop to it
- There's probably a few places we can simplify things
- Try using the Gens sound system, which might be faster than the MAME one
The way I had the system running in a PC test version of Genesis Plus was basically running the DAC emulation / FM timers each scanline, and then running the PSG and FM synths for an entire frame of audio at once, at the end of the frame. Probably not the most accurate way to do it (it'll break at least one game), but it seems to work well enough.
- Salamander2
- Insane DCEmu
- Posts: 150
- Joined: Mon Apr 05, 2004 8:38 pm
- Location: Rio Grande,RS - Brazil
- Has thanked: 0
- Been thanked: 0
-
- Modder Of Rage
- Posts: 805
- Joined: Mon Mar 18, 2002 12:41 pm
- Location: Midwest
- Has thanked: 0
- Been thanked: 0
- Contact:
doesnt stef's source use software rendering, so what happens when u switch the sound changes from stef's builds into BA's built. Im pretty sure sound would be loud and clear now with hardware rendered:)
Check out the beats of rage community at http://borrevolution.vg-network.com/
- Stef.D
- DCEmu Respected
- Posts: 114
- Joined: Wed Oct 15, 2003 1:46 am
- Has thanked: 0
- Been thanked: 0
- Contact:
BlackAura>
Unfortunatly, we can't have perfect synchro for both of them.
If we choose to synchronise on V-Blank, we will have some annoying noises in sound (except if we interpolate it, but sound is then a bit distorded).
If we choose to synchronise on Sound Buffer (it's what i'm doing in Gens) then we'll have sometime some tears on the screen... we can always wait for VBlank but then we will miss some frames :-/
In my viewpoint, sound synchro is far more important, i really dislike having noises in sound, it's so irritating :p
What i'm doing in Gens : i'm just comparing the "current read segment" against "current write segment" in sound buffer... while i can write new sound segment without raising "current read segment" i do frame skip, else i do a complete frame... and i'm waiting for writing a new segment without overlapping "current read segment"... what i call segment is the sound buffer for a frame (buffer lenght = 44100 Hz / 60 Hz)
At least you can copy the snd_stream.c file and maybe doing some hand modifications to system_frame function because i assume you modified it.
I also modified the main loop (function emu_run in main.c) which normally does manual frame skip.
My built already use the Gens sound core, but it doesn't performs well on DC, it's almost as fast as MAME core :-/ i think it's due to it memory usage (use 32 bits, does more memory buffer access when updating...)
I think the best thing to do is to use an old MAME version (0.35 or 0.36) of the core (newers are quite slow and not really more accurate).
PSG is used as DAC in AfterBurner 2, so this game won't product voice with this method, but that's not really important compared to the speed gain
As i said, that need very minors modifications compared to the old sound code. Just check in the snd_strem_pool function in the snd_stream.c file, now i do :
at end of function to return the number of samples yet required...
then in system_frame(...) i also did some minors modification :
returning 1 mean i want a frame skip for the next frame, else i return 0
By the way, i used the Z80 CPU interface as you can see, and it works
That will probably help you to fix it... if needed. CZ80 seems to work pretty nicely actually
Sakuragi>
Pour la prochaine version, je pense qu'il vaut mieux voir avec BlackAura
J'ai juste modifi? la gestion du frameskip, mais au niveau du VDP je n'ai rien chang?, et c'est le plus important ? mon sens car sur ma version c'est injouable tellement c lent !
DcSteve>
Actually we have 2 choices to synchronise emulation speed : Video Synchro (VBlank) or Sound synchro (Sound buffer wait).Ooooh... Neat.
Well, this is a bit simpler than what I had in mind. For some reason, I didn't think of using the sound output to control the emulator. Duh...
Unfortunatly, we can't have perfect synchro for both of them.
If we choose to synchronise on V-Blank, we will have some annoying noises in sound (except if we interpolate it, but sound is then a bit distorded).
If we choose to synchronise on Sound Buffer (it's what i'm doing in Gens) then we'll have sometime some tears on the screen... we can always wait for VBlank but then we will miss some frames :-/
In my viewpoint, sound synchro is far more important, i really dislike having noises in sound, it's so irritating :p
What i'm doing in Gens : i'm just comparing the "current read segment" against "current write segment" in sound buffer... while i can write new sound segment without raising "current read segment" i do frame skip, else i do a complete frame... and i'm waiting for writing a new segment without overlapping "current read segment"... what i call segment is the sound buffer for a frame (buffer lenght = 44100 Hz / 60 Hz)
Hey, don't erase your sources ! mine are really oldAssuming it works correctly (I'll throw it into my copy, play a few games, and see if it blows up or not), there's really only one thing left to do to get it working properly - decrease the size of the buffer to reduce the sound delay.
At least you can copy the snd_stream.c file and maybe doing some hand modifications to system_frame function because i assume you modified it.
I also modified the main loop (function emu_run in main.c) which normally does manual frame skip.
Well, you're right, there are many ways of optimising the sound code, and we should use all these you mentionnedAs for optimizing it, off the top of my head...
- Remove the mixing code in GP that mixes the two mono buffers into a single stereo buffer
- Remove the unmixing code in the sound driver that unmixes a single stereo buffer into two mono buffers
- Use DMA to transfer the sound data directly from the buffers
- Find places where we're needlessly copying sound data, and put a stop to it
There's probably a few places we can simplify things
- Try using the Gens sound system, which might be faster than the MAME one
My built already use the Gens sound core, but it doesn't performs well on DC, it's almost as fast as MAME core :-/ i think it's due to it memory usage (use 32 bits, does more memory buffer access when updating...)
I think the best thing to do is to use an old MAME version (0.35 or 0.36) of the core (newers are quite slow and not really more accurate).
Yeah, Gens sound engine work in entire 32 bits, because today's CPU computes 32 bits datas faster than 16 bits ones, and it was easier for final mixing. Unfortunatly on DC that doesn't help much, since it also takes x2 more memory.If I remember correctly, the Gens sound system outputs as 32-bit values, and does all it's own mixing, right? I don't suppose there's any way to get it to output 16-bit values in a format we can transfer directly? If we have to convert back to 16-bit samples, we might lose any speed gain that we might get.
It's the most common way of doingThe way I had the system running in a PC test version of Genesis Plus was basically running the DAC emulation / FM timers each scanline, and then running the PSG and FM synths for an entire frame of audio at once, at the end of the frame. Probably not the most accurate way to do it (it'll break at least one game), but it seems to work well enough.
PSG is used as DAC in AfterBurner 2, so this game won't product voice with this method, but that's not really important compared to the speed gain
I just checked the sources on the site, and they are correct.Hang about... I just downloaded the source you linked to, and I can't find anything even resembling what you just described.
As i said, that need very minors modifications compared to the old sound code. Just check in the snd_strem_pool function in the snd_stream.c file, now i do :
Code: Select all
return (needed_samples - got_samples);
then in system_frame(...) i also did some minors modification :
Code: Select all
if(snd.enabled)
{
if (audio_update() >= snd.buffer_size) return 1;
}
By the way, i used the Z80 CPU interface as you can see, and it works
That will probably help you to fix it... if needed. CZ80 seems to work pretty nicely actually
Sakuragi>
MerciBravo Stef congratulations for all your work. Je me suis inscrit ici juste pour te dire bravo ^^. You think we can have a version of genesis plus with good sound in few times ?
Pour la prochaine version, je pense qu'il vaut mieux voir avec BlackAura
J'ai juste modifi? la gestion du frameskip, mais au niveau du VDP je n'ai rien chang?, et c'est le plus important ? mon sens car sur ma version c'est injouable tellement c lent !
DcSteve>
Yeah my sources still use the software renderer and it's unplayable because it's slow as hell... sound code seems to be pretty slow also. I don't expect the BA version can run at full speed with sound enable... close to full speed, but not really full speed.doesnt stef's source use software rendering, so what happens when u switch the sound changes from stef's builds into BA's built. Im pretty sure sound would be loud and clear now with hardware rendered:)
-
- Modder Of Rage
- Posts: 805
- Joined: Mon Mar 18, 2002 12:41 pm
- Location: Midwest
- Has thanked: 0
- Been thanked: 0
- Contact:
so BA> did anything good happen to the sound after incorperating these changes into your source?
Check out the beats of rage community at http://borrevolution.vg-network.com/
- Quzar
- Dream Coder
- Posts: 7499
- Joined: Wed Jul 31, 2002 12:14 am
- Location: Miami, FL
- Has thanked: 4 times
- Been thanked: 10 times
- Contact:
do you REALLLY think he wouldnt post that information anyways without you asking? and as a secondary note to that, if he wasnt going to post it, do you think you asking him would change his mind about posting it if he wasnt going to?DcSteve wrote:so BA> did anything good happen to the sound after incorperating these changes into your source?
relax. go work on something instead of nagging him.
"When you post fewer lines of text than your signature, consider not posting at all." - A Wise Man
- Salamander2
- Insane DCEmu
- Posts: 150
- Joined: Mon Apr 05, 2004 8:38 pm
- Location: Rio Grande,RS - Brazil
- Has thanked: 0
- Been thanked: 0