Watara SuperVision emulator
Hi! I just found a supervision emulator in SDL for windows. I am trying to port it to DC. I don't know if a supervision emulator already exists in the scene, if not I hope to give a small contribution to it.
The problem I have is that in some parts it uses windows functions and C++. Can anyone help me to overcome these problems? For example the function timeGetTime() I have replaced it by clock(). Is that correct?
The code compiles ok with sh-elf g++ (I develop it using the Dev-Cpp environment), the whole system seems to work (I get almost the same logfile as the one running in windows) but the screen is totally black!
Is anyone willing to help me cause I have much work other than this to do?
Re: Watara SuperVision emulator
Aslong as the emu doesnt use windows DLL files,Direct X,Flash or anyother thing that the coders nor i think the Dreamcast can understand and i am not to sure.
Eric
Re: Watara SuperVision emulator
[quote author=elefas link=board=Dev;num=1107769913;start=0#0 date=02/07/05 at 10:51:53]Hi! I just found a supervision emulator in SDL for windows. I am trying to port it to DC. I don't know if a supervision emulator already exists in the scene, if not I hope to give a small contribution to it.
The problem I have is that in some parts it uses windows functions and C++. Can anyone help me to overcome these problems? For example the function timeGetTime() I have replaced it by clock(). Is that correct?
The code compiles ok with sh-elf g++ (I develop it using the Dev-Cpp environment), the whole system seems to work (I get almost the same logfile as the one running in windows) but the screen is totally black!
Is anyone willing to help me cause I have much work other than this to do?[/quote]
I think the function that is closest to timeGetTime() is timer_ms_gettime64() which returns the number of ms since KOS has started. I think that was available in KOS 1.2
Also what are you using to render to the screen?
Troy
Re: Watara SuperVision emulator
Thanks GPF, I am gonna check this.
The emulator uses SDL (some C++ classes) to render to the screen. One thing I noticed is that it uses setVideoMode to create a 160x160 resolution. At first I thought that this was the problem. I mean DC may not be able to render such a resolution. But it did not produce any errors at that point. I may post the SDL code here tonight so everyone can take a look at it.
Re: Watara SuperVision emulator
Good news. Thanks to GPF's advices the emu is up and running. Tested 2 games, they play slow but we'll see later what can be done for this. Currently it uses keyboard as input (have to fix it for dc gamepad) and has no sound. But that's my first attempt in porting an emulator!
I would like to upload a binary for you guys to test it also but currently I have not implemented a rom menu (I load the roms from romdisk) and that may be a legallity issue.
Re: Watara SuperVision emulator
glad to be of help. Good Luck with increasing the speed. If you need some help let us know.
Troy
Re: Watara SuperVision emulator
A bit of history for those who don't know what a Watara Supervision was can be found in the links:
http://www.silicium.org/console/supervision.htm
http://slydc.20m.com/supervsn.htm
Re: Watara SuperVision emulator
[quote author=elefas link=board=Dev;num=1107769913;start=0#4 date=02/08/05 at 18:01:40]Good news. Thanks to GPF's advices the emu is up and running. Tested 2 games, they play slow but we'll see later what can be done for this. Currently it uses keyboard as input (have to fix it for dc gamepad) and has no sound. But that's my first attempt in porting an emulator!
I would like to upload a binary for you guys to test it also but currently I have not implemented a rom menu (I load the roms from romdisk) and that may be a legallity issue.[/quote]
well done ;)
Re: Watara SuperVision emulator
Some more news:
-Added DC controller (on port 1)
-Improved the speed (unfolded some for() loops in gpu rendering). It now runs acceptable at standard rendering but it is still slow if an enhancement (2xSaI,...) is used.
the emu is using m6502.c as cpu emulator. I wonder if there exists a faster emulator than m6502.c The nesterdc 6502 emu seems quite different than the above so I don't know if I would benefit from it.
Re: Watara SuperVision emulator
If this uses SDL for the timer at all, it seemst that will slow things down. I've seen a couple of timer hacks work to speed things up, although I don't know how accurate they are. The hack I use is to edit timer/dc/SDL_systimer.c, specifically the SDL_StartTicks and SDL_GetTicks functions. It looks something like this in my setup:
Code:
void SDL_StartTicks(void)
{
Uint32 *milis, *secs;
timer_ms_gettime(secs, milis);
start = ((Uint32)secs*1000)+(Uint32)milis;
}
Uint32 SDL_GetTicks(void)
{
Uint32 *milis, *secs;
timer_ms_gettime(secs, millis);
return ((((Uint32)secs*1000)+(Uint32)milis)-start);
}
I don't know if that applies to your emulator or not, but I've noticed things that used the SDL timer speed up quite a bit after I changed those two functions so it might be useful to somebody. Good luck with the emulator. Can't wait to see it!