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
uncleben
DCEmu Freak
DCEmu Freak
Posts: 62
https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
Joined: Fri Apr 09, 2004 5:28 am
Has thanked: 0
Been thanked: 0

Post by uncleben »

Sorry if this has been asked before,
but why exactly does it take so much more CPU time to emulate a Z80 than a 68k.
I thought the Z80 is much simpler a processor than a 68k?

uncleben
Image
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 »

The Z80 is still the slowest emulated part, taking up at least as much CPU time as the software rendering does, or as much CPU time as gained by switching to C68k instead of Musashi. Since we dont have a working profiler, we cant accuractly ssee how much CPU time each part is using. Ba guesses that c68k in practice, is nowhere near fast enough to run at 12MHz and leave enough time left over to emulate the rest of the system, which includes the Z80.
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 »

He already knew that. uncleben, i am not sure if this answer is completely correct, but it seems fro what ive looked at that all the fast z80 cores out there are written in assembly (since the PC is usually the topic system). That leaves the ones made in C to have the goal of high accuracy instead of speed. And they are therefore slower.
"When you post fewer lines of text than your signature, consider not posting at all." - A Wise Man
abydos1000
DCEmu Super Poster
DCEmu Super Poster
Posts: 1237
Joined: Tue May 25, 2004 3:09 pm
Location: Here
Has thanked: 0
Been thanked: 0

Post by abydos1000 »

I would imagine that writing something like that in SH4 assembly would not be trival (and unfun). I doubt the people that wrote some of these things in x86 or PPC assembly had a whole lot of fun doing it.

I guess what is "fun" is all relative though.
Alexvrb
DCEmu Ultra Poster
DCEmu Ultra Poster
Posts: 1754
Joined: Wed Jul 17, 2002 11:25 am
Has thanked: 0
Been thanked: 0

Post by Alexvrb »

quzar wrote:He already knew that. uncleben, i am not sure if this answer is completely correct, but it seems fro what ive looked at that all the fast z80 cores out there are written in assembly (since the PC is usually the topic system). That leaves the ones made in C to have the goal of high accuracy instead of speed. And they are therefore slower.
Accuracy as a goal, but also perhaps they simply didn't CARE about speed regardless, both because PCs tend to have enough speed, and because of the availability of x86 asm cores. Not to mention that the compiler "of choice" for the Dreamcast tends to kind of suck at optimizing code. Even so, a really well written C core would provide a good boost. Something in SH4 asm would potentially yield even better results, but who would undertake something like that just for Z80? I'm looking forward to Stef's future C Z80 core. He did a good job with C68k, even though it obviously is new and not perfect yet.
uncleben
DCEmu Freak
DCEmu Freak
Posts: 62
Joined: Fri Apr 09, 2004 5:28 am
Has thanked: 0
Been thanked: 0

Post by uncleben »

okay that makes sense
Image
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 »

out out of curiosity, how much of the incorrect gfx blending or gfx fixes when it comes the playable chars, have been corrected/fixed/recoded since the last source release..

Also, BA you have a very important pm coming with something that could make you, and many other people extremely happy.
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 »

Well, the sprite corruption should be gone (not tested yet, but I've made the appropriate modifications). The tile cache code still needs cleaning up / speeding up though.

Assuming everything goes to plan, per-line scrolling should end up working, as should mid-frame palette changes. That'll fix most games that have minor graphics issues.
User avatar
Link2k4
DCEmu Banned
DCEmu Banned
Posts: 604
Joined: Sun May 16, 2004 3:56 am
Location: Detroit,Michigan
Has thanked: 0
Been thanked: 0

Post by Link2k4 »

is it possible to add saving to it too?not to be like "hey put this and this" on it, I was just wondering if you could do that.
Image
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 »

At this stage, no. Find me some documentation on how the saving works, and I might do it.
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 »

What do you mean BA. Saving for DC find you documention on DC saving?
Cause you could probably try one of like billion open source PC emus if your just looking for PC saving code for genesis.
SE! SE! SE! Believe the hype!
User avatar
InternetAddict
DCEmu Junior
DCEmu Junior
Posts: 40
Joined: Thu Feb 19, 2004 1:26 am
Location: USA, California
Has thanked: 0
Been thanked: 0

Post by InternetAddict »

BlackAura you truly are creator of a master piece of emulation software or port of a software rather :) You keep dcemulation exciting and worth visiting for me, I thank you for that. Genesis Plus/DC PVR preview 3 has to have the most potential like maybe in future online kaillera type play just imagine that would be awesome. I check everyday to see if you've released anything yet hehe
One day there will be a Sega CD Emulator on the Dreamcast I guarantee you.
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 wanted to have a release ready by the end of this month, with the contribution i sent him from mekaniazer, it is possible that a release can be done earlier.
Check out the beats of rage community at http://borrevolution.vg-network.com/
User avatar
InternetAddict
DCEmu Junior
DCEmu Junior
Posts: 40
Joined: Thu Feb 19, 2004 1:26 am
Location: USA, California
Has thanked: 0
Been thanked: 0

Post by InternetAddict »

sweet!!!!
One day there will be a Sega CD Emulator on the Dreamcast I guarantee you.
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 »

Generator, which is portable- Supports SRAM saves and saved states (which are compressed) maybe u can take the code instuction from there?

This is the closet tech instruction i can find...

http://home.hiwaay.net/~jfrohwei/sega/genesis.html

look under sram
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 »

Yeah thx for mention where you got those ideas from steve *rolls eyes*
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 »

Cause you could probably try one of like billion open source PC emus if your just looking for PC saving code for genesis.
Not really. Looking at Gens, for example, doesn't really reveal too much about how the saves work. They overlap the ROM in memory (which makes sense, because the save RAM is in the cartridge), there's some kind of switching mechanism to switch between ROM and SRAM (which I can't find), and there's a load of code to work out if the CPU is trying to read/write SRAM or the ROM.

Two problems - I can't isolate enough of it to understand how it works. I can't implement it without a (massive) drop in execution speed. At least, not the same way that Gens does it.

Same goes for other emulators - I can't just copy the code across, and generally the code is not particularly obvious because there are bits and pieces strewn throughout the emulator. If I actually knew what pieces I was looking for, I'd likely be able to find them all, but I don't, so I can't.
he wanted to have a release ready by the end of this month, with the contribution i sent him from mekaniazer, it is possible that a release can be done earlier.
Doubtful. There's still a lot of work to do.
This is the closet tech instruction i can find...

http://home.hiwaay.net/~jfrohwei/sega/genesis.html

look under sram
That's scroll ram, which is part of the VDP.
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 »

although this might be obvious or not helpful at all, maybe just look for any writes to adresses within the cartridge address space? that would automatically have to be SRAM since ... afaik, the ROM is...well rom =P.
"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 »

I've managed to cobble together enough information (from around five different sources, along with some experimentation) to get basic saves working. Just a few problems with it...

First, it works for Sonic 3, but not Sonic 3 and Knuckles, because it relies on the ROM header. To load the save, I need to know that the game has one before the game starts. The Sonic 3 ROM has that information, but the Sonic and Knuckles ROM does not (because it doesn't have any). When you combine the ROMs, the Sonic and Knuckles ROM goes first, and thus no save is detected. It will also not work if the ROM header is incorrect, or if it doesn't specify that the cartridge has save RAM.

Second, it will slow down emulation for any ROM greater than 2MB.

Third, it will only work for games that use the same kind of save RAM as Sonic 3. Not all games do. Games that use an EEPROM just won't work.

The first one can be partially fixed using a ROM database, but I'd need a complete list of every game that uses battery-backed RAM in the cartridge. The others can't be fixed.
DCmad
Psychotic DCEmu
Psychotic DCEmu
Posts: 724
Joined: Sat Mar 02, 2002 3:22 pm
Location: Salvador - Bahia - Brasil
Has thanked: 0
Been thanked: 0

Post by DCmad »

May i presume DreamSNES docs don't help at all?
Image
Locked