General Insanity (Genesis + PVR)
-
- DCEmu Veteran
- Posts: 850
- https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
- Joined: Mon Sep 01, 2003 11:12 am
- Location: NC/Iraq
- Has thanked: 0
- Been thanked: 0
- Contact:
-
- Soul Sold for DCEmu
- Posts: 4865
- Joined: Fri Jul 11, 2003 9:56 pm
- Has thanked: 2 times
- Been thanked: 4 times
I dont think the sound was shutdown just write a small shut down function when you return to the menu that should work fine. Depends if your using the Gens FM sound emulator or standard genesis plus FM emulator this is both.
Of course ive not tryed it yet never had a menu or loading more then one rom in a row.
Of course ive not tryed it yet never had a menu or loading more then one rom in a row.
Dreamcast forever!!!
-
- DC Developer
- Posts: 9951
- Joined: Sun Dec 30, 2001 9:02 am
- Has thanked: 0
- Been thanked: 1 time
ice88 - I have the twiddling code down to:
Mostly, that's going through the code, finding redundant calculations, and getting rid of them. I did write a small program which generated some code to twiddle 8x8 pixel tiles, but it wasn't any faster (as far as I could see). Modifying it to use store queues is probably the next step. That way, it'll be twiddling to an internal buffer (in the CPU, so it should be nice and fast) and then sending it over to VRAM while we're busy twiddling the next one.
By the way, I've made some graphical fixes to it. Background colours now work (although they look a little brighter than the foreground colours), it blanks out the border, blanking the screen now works, and 32-cell mode looks a little less crappy than it previously did. Personally, I think 640x480 does actually look better than 320x240, but only because I think the Dreamcast is doing something weird with 320x240 mode. And you can't see the dithering in 640x480, but it's a lot more noticable in 320x240
Still not worked out how to do windowing though. I could do a heavily bodged-up version which might just about be enough to get some games working. It certainly won't be accurate, but it might be enough to get some status bars showing up.
Code: Select all
#define TWIDTAB(x) ( (x&1)|((x&2)<<1)|((x&4)<<2) )
#define TWIDOUT(x, y) ( TWIDTAB((y)) | (TWIDTAB((x)) << 1) )
void twiddle_4bit_md(uint8 *src, pvr_ptr_t *dst)
{
int x, y;
uint8 * pixels;
uint16 * vtex;
pixels = (uint8 *) src;
vtex = (uint16*)dst;
for (y=0; y<8; y += 2)
{
int yv1 = y<<3;
int yv2 = yv1+8;
for (x=0; x<8; x += 2)
{
int sx = x ^ 2;
vtex[TWIDOUT(x>>1, y>>1)] =
((pixels[(sx+yv1) >>1]&15)<<8) | ((pixels[(sx+yv2) >>1]&15)<<12) |
((pixels[(sx+yv1) >>1]>>4) ) | ((pixels[(sx+yv2) >>1]>>4)<<4);
}
}
}
By the way, I've made some graphical fixes to it. Background colours now work (although they look a little brighter than the foreground colours), it blanks out the border, blanking the screen now works, and 32-cell mode looks a little less crappy than it previously did. Personally, I think 640x480 does actually look better than 320x240, but only because I think the Dreamcast is doing something weird with 320x240 mode. And you can't see the dithering in 640x480, but it's a lot more noticable in 320x240
Still not worked out how to do windowing though. I could do a heavily bodged-up version which might just about be enough to get some games working. It certainly won't be accurate, but it might be enough to get some status bars showing up.
-
- DCEmu Veteran
- Posts: 850
- Joined: Mon Sep 01, 2003 11:12 am
- Location: NC/Iraq
- Has thanked: 0
- Been thanked: 0
- Contact:
-
- DC Developer
- Posts: 453
- Joined: Thu May 16, 2002 8:29 am
- Location: ice88's house
- Has thanked: 0
- Been thanked: 0
- Contact:
Yes - pretty slick that'll be I reckon, you really have cut down the twiddle function an impressive amount - that must make a noticeable difference... I would think so anyway.BlackAura wrote:...Modifying it to use store queues is probably the next step. That way, it'll be twiddling to an internal buffer (in the CPU, so it should be nice and fast) and then sending it over to VRAM while we're busy twiddling the next one.
Interesting - can we fix that with the vertex_colour value being something other than 0xFFFFFFFF - you may have noticed, I hard-coded that value instead of using vertex_colour... if you didn't notice and used this mechanism to fix it, apologies - it was my doing.BlackAura wrote:By the way, I've made some graphical fixes to it. Background colours now work (although they look a little brighter than the foreground colours)
OK - if you have code changes, any chance you can upload them somewhere?BlackAura wrote:it blanks out the border, blanking the screen now works, and 32-cell mode looks a little less crappy than it previously did.
Interesting - I could not see much difference in truth - the main difference for my money is that it works nicely in CHANKAST with 640x480 and doesn't with 320x240.BlackAura wrote:Personally, I think 640x480 does actually look better than 320x240, but only because I think the Dreamcast is doing something weird with 320x240 mode. And you can't see the dithering in 640x480, but it's a lot more noticable in 320x240
Ah - status bars - I wondered what windowed mode actually was.BlackAura wrote:Still not worked out how to do windowing though. I could do a heavily bodged-up version which might just about be enough to get some games working. It certainly won't be accurate, but it might be enough to get some status bars showing up.
Anyway, great - this is just whizzing along, we should all work together more often!!!! As soon as you have some code to make available, please update - I'm ready to take up the overnight challenge tonight!!!!
Read my blog: http://unrational.blogspot.com
-
- DC Developer
- Posts: 9951
- Joined: Sun Dec 30, 2001 9:02 am
- Has thanked: 0
- Been thanked: 1 time
It makes a bit of a difference, but not a lot. Rocket Knight Adventures (probably the least demanding game I have that's still fun) works full speed almost all the time, except where theres a load of explosions on screen, but the game itself slows down then, so you don't notice.Yes - pretty slick that'll be I reckon, you really have cut down the twiddle function an impressive amount - that must make a noticeable difference... I would think so anyway.
Maybe. It's actually brighter now.Interesting - can we fix that with the vertex_colour value being something other than 0xFFFFFFFF - you may have noticed, I hard-coded that value instead of using vertex_colour... if you didn't notice and used this mechanism to fix it, apologies - it was my doing.
The reason I had vertex_colour was for later. Some MD games will render the low-priority background layers at half brightness, but only if a bit in one of the registers is set. I don't know what bit that is, so...
No. Still working on it (see below)OK - if you have code changes, any chance you can upload them somewhere?
Speaking of which, I've done a really dodgy implementation of these. It works for status bars, but it certainly won't work if a game uses a window as part of the actual game. Basically, it draws the window plane over the top of plane A. It's supposed to replace plane A (as in - plane A is never drawn, and the window replaces it) but that's too much effort right now. So status bars (appear to) work, at least in Rocket Knight.Ah - status bars - I wondered what windowed mode actually was.
I'll make a couple more changes, and then re-upload it.
-
- DCEmu Uncool Newbie
- Posts: 1459
- Joined: Sat Dec 27, 2003 10:40 pm
- Has thanked: 0
- Been thanked: 0
- Contact:
i thinks its too early for a bug report, but just in case its useful i noticed a few games that have specifical graffical problems that need to be fixed:
sonic 2: in 2players mode the screen is a real garbage
shining force and zombie ate my neighbours: the screen is not centered properly, its "pushed" to the left and the right side is displaying some "unused" sprites.
outrun: the multidirectionnal scrolling doesnt seem to work properly in this game, the road is barely visible.
afterburner: on the horizon this makes a "stairs" effect instead of a diagonal line, depending on how much you rotate the plane.
aladdin and cool spot (probably other virgin games as well): the hero's sprite is a bit more buggy than in other games.
also i think in 640x480 the sprites that should be hidden and are displayed by accident one more frame are more noticable than in 320x240 (for example the "sega" logo in phantasy star 4).
sonic 2: in 2players mode the screen is a real garbage
shining force and zombie ate my neighbours: the screen is not centered properly, its "pushed" to the left and the right side is displaying some "unused" sprites.
outrun: the multidirectionnal scrolling doesnt seem to work properly in this game, the road is barely visible.
afterburner: on the horizon this makes a "stairs" effect instead of a diagonal line, depending on how much you rotate the plane.
aladdin and cool spot (probably other virgin games as well): the hero's sprite is a bit more buggy than in other games.
also i think in 640x480 the sprites that should be hidden and are displayed by accident one more frame are more noticable than in 320x240 (for example the "sega" logo in phantasy star 4).
-
- DCEmu Veteran
- Posts: 850
- Joined: Mon Sep 01, 2003 11:12 am
- Location: NC/Iraq
- Has thanked: 0
- Been thanked: 0
- Contact:
-
- DC Developer
- Posts: 9951
- Joined: Sun Dec 30, 2001 9:02 am
- Has thanked: 0
- Been thanked: 1 time
Alright, I'm going to bed now (it's 3AM, so...)
Here's what I've done:
Fixed 32-cell mode (it's not full screen, but it's centered and there's no garbage on the screen anymore)
Drawn window borders
Added (crappy) windowing emulation
A load of tweaks here and there
Stuff that still needs doing soon-ish:
xrender_draw_ntx and xrender_draw_ntw need some speedups
Twiddling code needs to be rewritten to use store queues
Change the CPU core to Stef's C68K emulator
Integrate Speud's menu
Better controller interface
That weird sprite corruption thing needs fixing
For the menu, the menu code should be in a separate file. My current codebase has a file for it (menu.c), but no menu as yet. The codebase also doesn't support switching resolution on the fly, so that might need to be taken out.
For the controller interface, we should integrate ice88's modifications, but with a couple of differences. First, we should re-scan the maple bus periodically, so we can see if someone's plugged in / removed a controller. Second, that information should be passed to the MegaDrive. In main.c there's a bit that calls io_rescan (see io.c), and that's how you connect devices to the MD's controller ports.
If anyone else wants to do some hacking on the VDP core itself, feel free. I've been mostly using this document (which was written by Charles MacDonald, who also wrote Genesis Plus) and the GenPlus software VDP for reference.
Here's what I've done:
Fixed 32-cell mode (it's not full screen, but it's centered and there's no garbage on the screen anymore)
Drawn window borders
Added (crappy) windowing emulation
A load of tweaks here and there
Stuff that still needs doing soon-ish:
xrender_draw_ntx and xrender_draw_ntw need some speedups
Twiddling code needs to be rewritten to use store queues
Change the CPU core to Stef's C68K emulator
Integrate Speud's menu
Better controller interface
That weird sprite corruption thing needs fixing
For the menu, the menu code should be in a separate file. My current codebase has a file for it (menu.c), but no menu as yet. The codebase also doesn't support switching resolution on the fly, so that might need to be taken out.
For the controller interface, we should integrate ice88's modifications, but with a couple of differences. First, we should re-scan the maple bus periodically, so we can see if someone's plugged in / removed a controller. Second, that information should be passed to the MegaDrive. In main.c there's a bit that calls io_rescan (see io.c), and that's how you connect devices to the MD's controller ports.
If anyone else wants to do some hacking on the VDP core itself, feel free. I've been mostly using this document (which was written by Charles MacDonald, who also wrote Genesis Plus) and the GenPlus software VDP for reference.
Needs interlaced video mode. As far as I know, this is the only game that uses it...sonic 2: in 2players mode the screen is a real garbage
32-cell mode. Kinda fixed (it's now centered and no garbage displayed on screen). Ideally, it'd be stretched to full screen, but it isn't yet.shining force and zombie ate my neighbours: the screen is not centered properly, its "pushed" to the left and the right side is displaying some "unused" sprites.
Needs scanline-accurate renderer, which this isn't. Road Rash or similar games will be just as bad.outrun: the multidirectionnal scrolling doesnt seem to work properly in this game, the road is barely visible.
afterburner: on the horizon this makes a "stairs" effect instead of a diagonal line, depending on how much you rotate the plane.
This is the buggy sprite thing again. I know exactly why this is happening, but I can't fix it yet.aladdin and cool spot (probably other virgin games as well): the hero's sprite is a bit more buggy than in other games.
-
- DC Developer
- Posts: 9951
- Joined: Sun Dec 30, 2001 9:02 am
- Has thanked: 0
- Been thanked: 1 time
After much trouble trying to upload this thing (files.frashii.com isn't working properly, my university's authentication server appears to be down...), and having it dribble up at 1K/s...
http://files.frashii.com/~sp00nz/Doom/f ... -2.tar.bz2
http://files.frashii.com/~sp00nz/Doom/f ... -2.tar.bz2
-
- DC Developer
- Posts: 453
- Joined: Thu May 16, 2002 8:29 am
- Location: ice88's house
- Has thanked: 0
- Been thanked: 0
- Contact:
Didn't get as much done as I'd hoped to tonight - but I did manage to split the menu out to menu.c / menu.h - improved the controls in the menu (repeat) - re-introduced a couple of speedups that were not there - and some other stuff.
The result is actually pretty damned good!
Anyway - this applies as a delta on-top of gpdc-pvr-2.tar.bz2 to give you what I currently have...
http://homepage.ntlworld.com/ian_edward ... armtoe.zip
I must change my nick back to warmtoe some time - warmtoe is the name!
The result is actually pretty damned good!
Anyway - this applies as a delta on-top of gpdc-pvr-2.tar.bz2 to give you what I currently have...
http://homepage.ntlworld.com/ian_edward ... armtoe.zip
I must change my nick back to warmtoe some time - warmtoe is the name!
Read my blog: http://unrational.blogspot.com
-
- DCEmu Uncool Newbie
- Posts: 1459
- Joined: Sat Dec 27, 2003 10:40 pm
- Has thanked: 0
- Been thanked: 0
- Contact:
argh thats what i did too ^^;
nevermind, you did a better job and thats not like i worked hard on it anyway.
btw, i dont know yet if thats because of something i changed in the source (i dont think so) but it looks slower now. sonic 1 is not as smooth as before and sonic 2 is really slow sometimes.
besides shining force 2 freezes after the sega logo and shining force 1 exits the app at the same moment.
zombies' bug has been partially fixed, the main screen is centered correctly, but when the game starts the screen goes back to the left and there is some unwanted sprites hiding the center of the screen.
will i tried to replace snd_stream_shutdown() with one of the functions you pointed and the compiler told me about implicit declaration, i never had any problem with snd_stream_shutdown() personnally.
nevermind, you did a better job and thats not like i worked hard on it anyway.
btw, i dont know yet if thats because of something i changed in the source (i dont think so) but it looks slower now. sonic 1 is not as smooth as before and sonic 2 is really slow sometimes.
besides shining force 2 freezes after the sega logo and shining force 1 exits the app at the same moment.
zombies' bug has been partially fixed, the main screen is centered correctly, but when the game starts the screen goes back to the left and there is some unwanted sprites hiding the center of the screen.
will i tried to replace snd_stream_shutdown() with one of the functions you pointed and the compiler told me about implicit declaration, i never had any problem with snd_stream_shutdown() personnally.
-
- DCEmu Veteran
- Posts: 850
- Joined: Mon Sep 01, 2003 11:12 am
- Location: NC/Iraq
- Has thanked: 0
- Been thanked: 0
- Contact:
Ah, yeah, Warmtoe change change his code to "gpdc" to all of the snd_stream stuff becuase he was getting errors because of the functions already defined in KOS, so that's what I've been using because I was getting the same thing. Dunno if it still in his current source but use 'gpdc_snd_stream_clear' or if you don't have this problem use 'snd_stream_clear' as defined in snd_stream.h.
I added the earlier code of Blackaura's to the mess I have and I must say the fixes were excellent. I'll add Warmtoe's new stuff and I'm trying to get uncompressed saves working, then I'll try to work on compressed saves
EDIT: Btw, I am using an SVN version of KOS from last month. Might be a version issue with the snd_stream, eh?
I added the earlier code of Blackaura's to the mess I have and I must say the fixes were excellent. I'll add Warmtoe's new stuff and I'm trying to get uncompressed saves working, then I'll try to work on compressed saves
EDIT: Btw, I am using an SVN version of KOS from last month. Might be a version issue with the snd_stream, eh?
Last edited by Storminator16 on Wed Jun 23, 2004 5:54 pm, edited 1 time in total.
-
- DCEmu Uncool Newbie
- Posts: 1459
- Joined: Sat Dec 27, 2003 10:40 pm
- Has thanked: 0
- Been thanked: 0
- Contact:
nevermind that was probably something i changed in dc_options by accident, i just tried blackaura's latest release without menu and its as fast as before (maybe faster but i cant see the difference for now).
so warmtoe did you use this source or did you make your own changes? i like the improvements you made to the menu, though i think the controls are too fast, luckily the delay is easy to change.
will i think warmtoe's release uses gpdc_snd_stream_shutdown(), i think i saw the implicit declaration warning while compiling, but it looks like its not causing any trouble.
so warmtoe did you use this source or did you make your own changes? i like the improvements you made to the menu, though i think the controls are too fast, luckily the delay is easy to change.
will i think warmtoe's release uses gpdc_snd_stream_shutdown(), i think i saw the implicit declaration warning while compiling, but it looks like its not causing any trouble.
-
- DCEmu Veteran
- Posts: 850
- Joined: Mon Sep 01, 2003 11:12 am
- Location: NC/Iraq
- Has thanked: 0
- Been thanked: 0
- Contact:
- Christuserloeser
- Moderator
- Posts: 5948
- Joined: Thu Aug 28, 2003 12:16 am
- Location: DCEvolution.net
- Has thanked: 10 times
- Been thanked: 0
- Contact:
You might be correct but not sure with that... I'll check other games!BlackAura wrote:Here's what I've done:
Fixed 32-cell mode (it's not full screen, but it's centered and there's no garbage on the screen anymore)
Drawn window borders
Added (crappy) windowing emulation
A load of tweaks here and there
Needs interlaced video mode. As far as I know, this is the only game that uses it...sonic 2: in 2players mode the screen is a real garbage
Possible: Wiz'n'Liz ... no! It's common res like Sonic3's vs mode
I know: Dashin' Desperados by Data East! There aren't many that's for sure. These ones didn't work with SegaGen either.
I bet. Now this sounds like SegaGen Unbelievable that you achieved the same level! ...and they had better equipment and were paid for their workBlackAura wrote:Needs scanline-accurate renderer, which this isn't. Road Rash or similar games will be just as bad.outrun: the multidirectionnal scrolling doesnt seem to work properly in this game, the road is barely visible.
afterburner: on the horizon this makes a "stairs" effect instead of a diagonal line, depending on how much you rotate the plane.
I've started a bug report today, lots of games tested but most bugs I've recognized are already fixed now like you've mentioned above Have a look though maybe it still helps in some ways?
http://www.dcemu.co.uk/cgi-bin/yabb/YaB ... 1088028089
I'll finish that list today but I'll test that Street Fighter thing tomorrow (don't have it on my current test disc.
@ Ice88: Yes, change it back to Warmtoe! Cool name that is...
*currently listens to: Gens (Win32) - Mega Turrican (C. H?lsbeck)*
Insane homebrew collector.
-
- DCEmu Uncool Newbie
- Posts: 1459
- Joined: Sat Dec 27, 2003 10:40 pm
- Has thanked: 0
- Been thanked: 0
- Contact:
hmmm thats not really a good idea to compare it with segagen to me the goal is to avoid mentioning it in the future if im not wrong.
will yes when i went back to the menu the sound was stopped, first it wasnt thats why i added snd_stream_shutdown(), that solved the problem for me. i used kos-1.2.0 so that might be the problem.
will yes when i went back to the menu the sound was stopped, first it wasnt thats why i added snd_stream_shutdown(), that solved the problem for me. i used kos-1.2.0 so that might be the problem.
-
- DC Developer
- Posts: 9951
- Joined: Sun Dec 30, 2001 9:02 am
- Has thanked: 0
- Been thanked: 1 time
Well... it does have a few similarities to the Smash Pack, actually. Obviously not as "finished" yet, but it's progressing a hell of a lot faster than I thought it would. Give it a couple of weeks, and we'll never need to mention it again. I hope.
warmtoe - Thanks! I'll grab your code, and have a look at it.
warmtoe - Thanks! I'll grab your code, and have a look at it.
-
- Soul Sold for DCEmu
- Posts: 4865
- Joined: Fri Jul 11, 2003 9:56 pm
- Has thanked: 2 times
- Been thanked: 4 times
Compiler flags will have little effect when most of the bottle neck has been removed. Try compiling the cpu core at -02 since -03 will make it slower.
Standard version will show more speed change then this version with compiler settings.
-02 might be faster on this code looking at it.
Standard version will show more speed change then this version with compiler settings.
-02 might be faster on this code looking at it.
Last edited by Ian Micheal on Wed Jun 23, 2004 8:31 pm, edited 1 time in total.
Dreamcast forever!!!