Interest in Dynarec?

Ask anything your want about Mega/SegaCD programming.

Moderator: Mask of Destiny

Post Reply
Mask of Destiny
Very interested
Posts: 616
Joined: Thu Nov 30, 2006 6:30 am

Interest in Dynarec?

Post by Mask of Destiny » Thu Apr 12, 2007 3:06 pm

I'm thinking about trying to write a dynarec targetting 68K CPUs (the dynarec would run on the 68K not emulate it). Is there any interest in such a project and if so what CPU would you like to see emulated? I'm thinking about trying the 6502 since it has such a simple instruction set, but I'm open to suggestions.

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Re: Interest in Dynarec?

Post by Stef » Thu Apr 12, 2007 5:23 pm

Mask of Destiny wrote:I'm thinking about trying to write a dynarec targetting 68K CPUs (the dynarec would run on the 68K not emulate it). Is there any interest in such a project and if so what CPU would you like to see emulated? I'm thinking about trying the 6502 since it has such a simple instruction set, but I'm open to suggestions.
I think it's a very challenging and exciting project ! for me it's enough good reason to start the fun ;) honestly i would love to do something like that but i've many others projects... anyway i'm open for any "philosophical" discuss about it, i'm very interested :)

Mask of Destiny
Very interested
Posts: 616
Joined: Thu Nov 30, 2006 6:30 am

Re: Interest in Dynarec?

Post by Mask of Destiny » Thu Apr 12, 2007 6:28 pm

Stef wrote:
Mask of Destiny wrote:I'm thinking about trying to write a dynarec targetting 68K CPUs (the dynarec would run on the 68K not emulate it). Is there any interest in such a project and if so what CPU would you like to see emulated? I'm thinking about trying the 6502 since it has such a simple instruction set, but I'm open to suggestions.
I think it's a very challenging and exciting project ! for me it's enough good reason to start the fun ;)
Yeah, writing a dynarec has been on my list of cool projects to do for quite some time. I don't necessarily need anyone to want to use it to get motivated for the project. I'm mostly just looking for suggestions on what architecture to emulate.
honestly i would love to do something like that but i've many others projects...
Yeah, I know how that goes.
anyway i'm open for any "philosophical" discuss about it, i'm very interested :)
I'm curious if anyone knows anything about a new class of dynarecs that instead of pairing an interpretter with a dynarec core, pairs a "fast" dynarec that does no optimization on the converted code and a "slow" optimizing dynarec. Might not really be appropriate for a low memory system like the Sega CD, but interesting none the less.

If I go with the 6502 I'm half tempted to implement 65c816 support at some point. It would be fun to try and get a basic SNES emulator working on the Genesis/Sega CD/32X combo.

Fonzie
Genny lover
Posts: 323
Joined: Tue Aug 29, 2006 11:17 am
Contact:

Post by Fonzie » Thu Apr 12, 2007 8:06 pm

Héhé :D I would be happy to fallow the philosophy too (read it, i mean).
Dynarec means the code conversion is done during the executing process, right?

What is the name of the method that generate a converted executable for the targeted system?
I mean, using a windows applz to convert NES code to GenCode.

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Re: Interest in Dynarec?

Post by Stef » Thu Apr 12, 2007 8:14 pm

Mask of Destiny wrote: Yeah, writing a dynarec has been on my list of cool projects to do for quite some time. I don't necessarily need anyone to want to use it to get motivated for the project. I'm mostly just looking for suggestions on what architecture to emulate.
Well 6502 seems a good choice, very simple instruction, can easily put all register "alive"... also it's used in NES system. I guess it wouls be a lot more fun to see a NES emulator on SegaCD than a SMS emu ;)
anyway i'm open for any "philosophical" discuss about it, i'm very interested :)
I'm curious if anyone knows anything about a new class of dynarecs that instead of pairing an interpretter with a dynarec core, pairs a "fast" dynarec that does no optimization on the converted code and a "slow" optimizing dynarec. Might not really be appropriate for a low memory system like the Sega CD, but interesting none the less.
I remember sometime ago i wanted to write a 100% dynarec (no interpreter) 68000 emulator for the GBA which has the same (even worst in fact) memory limitation, but we can use the dynarec from ROM which unfortunatly, we can't on the sega CD... or maybe by using the main CPU as the recompiler and the sub CPU as executer ? :D
The sega CD offers many possibilities for a dynarec structure :)
Using an interpreter would be anyway too slow...
If I go with the 6502 I'm half tempted to implement 65c816 support at some point. It would be fun to try and get a basic SNES emulator working on the Genesis/Sega CD/32X combo.
It's just impossible to do SNES emulation on genesis/segacd couple, 32X is a must have :p

ob1
Very interested
Posts: 463
Joined: Wed Dec 06, 2006 9:01 am
Location: Aix-en-Provence, France

Re: Interest in Dynarec?

Post by ob1 » Thu Apr 12, 2007 9:28 pm

Stef wrote:It's just impossible to do SNES emulation on genesis/segacd couple, 32X is a must have :p
Did someone ask for me ?

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef » Thu Apr 12, 2007 11:03 pm

Fonzie wrote:Héhé :D I would be happy to fallow the philosophy too (read it, i mean).
Dynarec means the code conversion is done during the executing process, right?

What is the name of the method that generate a converted executable for the targeted system?
I mean, using a windows applz to convert NES code to GenCode.
static compilation ?

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Re: Interest in Dynarec?

Post by Stef » Thu Apr 12, 2007 11:04 pm

ob1 wrote:
Stef wrote:It's just impossible to do SNES emulation on genesis/segacd couple, 32X is a must have :p
Did someone ask for me ?
yep, we need your super VDP to emulate the SNES one :P

Fonzie
Genny lover
Posts: 323
Joined: Tue Aug 29, 2006 11:17 am
Contact:

Post by Fonzie » Thu Apr 12, 2007 11:23 pm

haha, that's insane ^^...

"static compilation ?"
Ho yeah :D Static Recompilation :)
But isn't static recompilation similar to dynarec? It is maybe even more handy?

I really get the recompilation thing but I don't get the advantage of doing it dynamicaly...

Mask of Destiny
Very interested
Posts: 616
Joined: Thu Nov 30, 2006 6:30 am

Post by Mask of Destiny » Fri Apr 13, 2007 1:31 am

Fonzie wrote:haha, that's insane ^^...

"static compilation ?"
Ho yeah :D Static Recompilation :)
But isn't static recompilation similar to dynarec? It is maybe even more handy?

I really get the recompilation thing but I don't get the advantage of doing it dynamicaly...
The problem is that it's very difficult to figure out what's data and what's code. For instance, if there's a jumptable it can be difficult to determine what indexes into the table lead to actual code. Self modifying code is a problem as is code that get's copied from one location to another (perhaps copied from ROM to RAM).

Static recompilation works best when the code is compiled from a higher level language (like C) rather than assembly and it's packaged in an object file that makes some attempt at separating data and code.

ob1
Very interested
Posts: 463
Joined: Wed Dec 06, 2006 9:01 am
Location: Aix-en-Provence, France

Post by ob1 » Wed Apr 23, 2008 10:36 am

OK, I've been thinking about a Genny emulator for the GBA for an hour, turned enthusiastic, really, indeed, and felt in front of this answer from MoD : you can't guess what's code and what's data ...
:(
Oh my !

C U Genny fans.

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef » Wed Apr 23, 2008 8:11 pm

ob1 wrote:OK, I've been thinking about a Genny emulator for the GBA for an hour, turned enthusiastic, really, indeed, and felt in front of this answer from MoD : you can't guess what's code and what's data ...
:(
Oh my !

C U Genny fans.
I had the same idea a long time ago. I was thinking about dynarec tech but the GBA strong limitations quickly demotived me.

Sik
Very interested
Posts: 939
Joined: Thu Apr 10, 2008 3:03 pm
Contact:

Post by Sik » Wed Apr 23, 2008 10:16 pm

Maybe somebody should try the DS? Anyways, watch out, there's a SMS/GG emulator for GBA. Runs at about 45 FPS in average, so I guess somebody may want to give a try for a Mega Drive emulator in the DS. Or a SMS/GG one because the resolution in the DS matches the SMS one and you don't have to stretch or scroll as in the GBA version :P Also it would finally run at full speed.
Sik is pronounced as "seek", not as "sick".

TulioAdriano
Very interested
Posts: 81
Joined: Tue Jul 10, 2007 7:45 pm
Location: Brazil / USA
Contact:

Post by TulioAdriano » Thu Apr 24, 2008 2:33 pm

There's one emulator called ApprenticeMinusDS that is a SMS/GG Emulator, runs at 60FPS clean, and like you said the resolution matches it is simply beautiful. I played Phantasy Star and SRAM works great too.

There's also an emulator called jENESIS that runs most games I tried, and all at 60 FPS, with decent sound (incomplete compared to Gens/Fusion). It didn't work with roms > 24 Mbits (SSF and Pier Solar).

As far as emulating NES/GB on MCD, well I just don't see it worth the effort, would be much more interesting to ressurrect the old story about running MD/SMS games from MCD, but oh well... that topic has been already exausted more than 8 years ago! :D

Seeya!
Image

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef » Thu Apr 24, 2008 6:11 pm

TulioAdriano wrote:There's one emulator called ApprenticeMinusDS that is a SMS/GG Emulator, runs at 60FPS clean, and like you said the resolution matches it is simply beautiful. I played Phantasy Star and SRAM works great too.

There's also an emulator called jENESIS that runs most games I tried, and all at 60 FPS, with decent sound (incomplete compared to Gens/Fusion). It didn't work with roms > 24 Mbits (SSF and Pier Solar).

As far as emulating NES/GB on MCD, well I just don't see it worth the effort, would be much more interesting to ressurrect the old story about running MD/SMS games from MCD, but oh well... that topic has been already exausted more than 8 years ago! :D

Seeya!
jENESIS is just amazing. 60 FPS in almost every game *with sound*. The sound of the last version is quite correct. I know the author has some ideas to improve it (if it's possible) ;)

Post Reply