single game pingpong mame beta 2 full sound speed out now

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.
Post Reply
reaper2k2
DC Developer
DC Developer
Posts: 2648
Joined: Sun Mar 24, 2002 7:48 pm
Has liked: 0
Been liked: 0
Contact:

single game pingpong mame beta 2 full sound speed out now

Post by reaper2k2 » Mon Oct 28, 2002 9:42 am

well thanks to warmtoe's help and skill in coding i now have sound

check the site or read me for more details

get beta2 only as beta one had no sound

frameskip sound few other features


http://dcdevr2k2.topcities.com/

just to let you know im still working on stuff ive been trying to slow this down not up but made it a tad faster due to cpu_slices some games can be speeded up and down using this hardcoding it into the driver for EG

this was by request for UberJim not all things made it in this version

geting there
http://homebrew.dcemulation.com/dcgames/ *homebrew webbrowser games *

http://r2k2gate.topcities.com *dev site and my releases*
Image
Im' a Commodorian are you?
UberJim
UberBootCreator
UberBootCreator
Posts: 155
Joined: Fri Dec 07, 2001 2:15 pm
Has liked: 0
Been liked: 0

Post by UberJim » Mon Oct 28, 2002 12:30 pm

This sounds great. Now I don't really know anything about programming, but I will add my stupid ideas in, and maybe they will spark something for you. What if you were to add another #include? Something that wouldn't be usefull to the program, but would take up memory and maybe slow it down a little bit? Or what if you were to have a global variable that was just there to hold integers, you then had a while statement that counted something in the program and resetted everytime it hit 1000, just something silly that may slow the program a little bit. Also, what if a sleep() was added? I would just like to re-state the fact that I am no programmer, I was just hoping to spark an idea with this sillyness.
Image
reaper2k2
DC Developer
DC Developer
Posts: 2648
Joined: Sun Mar 24, 2002 7:48 pm
Has liked: 0
Been liked: 0
Contact:

sounds

Post by reaper2k2 » Mon Oct 28, 2002 12:54 pm

Sounds like a plan next version should be slower
http://homebrew.dcemulation.com/dcgames/ *homebrew webbrowser games *

http://r2k2gate.topcities.com *dev site and my releases*
Image
Im' a Commodorian are you?
UberJim
UberBootCreator
UberBootCreator
Posts: 155
Joined: Fri Dec 07, 2001 2:15 pm
Has liked: 0
Been liked: 0

Post by UberJim » Mon Oct 28, 2002 1:15 pm

I actually got some tips from someone who helped code ZSNES for PC, though I don't totally understand it, I will put it here.
[2:03pm]?@ Pharos_? UberJim: use gettimeofday to find out the seconds/useconds. when the cycle count on the virtual cpu in mame (yes, i helped code zsnes) shows that the real world has passed less time then the virtual cpu would have, and you have no events to process such as updating the video, then you sleep the difference with usleep or select
[2:04pm]?@ Pharos_? most of the time we sync on the video card as a delay, because video updates are slow, so we allow more frames per second when the emulating system is running faster then all the processing needed to emulate the virtual system
[2:04pm]?@ Pharos_? and we skip frames when the system is too slow
[2:06pm]?@ Pharos_? select would be smartest, because sleep actually uses alarm() to produce a signal then it waits for SIGALRM, which means anything else that may use alarm can be affected, and if a different signal occurs it will wake up as well
[2:08pm]?@ Pharos_? select is SUPPOSE to add a timer event inside the kernel seperate from alarm system, it can still be woke up with a signal but you reduced the assumption channel, and you correct any timing issues with gettimeofday before and sometimes after select
I would just like to add that I can't believe I actually talked to Pharos, that is just amazing, that made my day. I actually had a conversation with one of the emu coding elite. Now if only I were to have a phone conversation with Steve Snake.
Image
reaper2k2
DC Developer
DC Developer
Posts: 2648
Joined: Sun Mar 24, 2002 7:48 pm
Has liked: 0
Been liked: 0
Contact:

Post by reaper2k2 » Mon Oct 28, 2002 2:20 pm

VERY COOL and yeah steve snake or dan potter would be good lol
http://homebrew.dcemulation.com/dcgames/ *homebrew webbrowser games *

http://r2k2gate.topcities.com *dev site and my releases*
Image
Im' a Commodorian are you?
UberJim
UberBootCreator
UberBootCreator
Posts: 155
Joined: Fri Dec 07, 2001 2:15 pm
Has liked: 0
Been liked: 0

Post by UberJim » Mon Oct 28, 2002 3:36 pm

Do you get what Pharos was saying? Did any of the things that I posted help?
Image
reaper2k2
DC Developer
DC Developer
Posts: 2648
Joined: Sun Mar 24, 2002 7:48 pm
Has liked: 0
Been liked: 0
Contact:

Post by reaper2k2 » Mon Oct 28, 2002 4:50 pm

Yes it help thanks for that ill try doing that soon see how it turns out


thanks for your help
http://homebrew.dcemulation.com/dcgames/ *homebrew webbrowser games *

http://r2k2gate.topcities.com *dev site and my releases*
Image
Im' a Commodorian are you?
Cutman
DCEmu Junior
DCEmu Junior
Posts: 48
Joined: Wed Jan 16, 2002 7:32 pm
Location: Niagara Falls, Canada
Has liked: 0
Been liked: 0

Post by Cutman » Mon Oct 28, 2002 9:10 pm

Nice job reaper, I love this game.
jeffma
DCEmu Junior
DCEmu Junior
Posts: 38
Joined: Wed Sep 18, 2002 5:27 pm
Has liked: 0
Been liked: 0

Post by jeffma » Tue Oct 29, 2002 5:18 am

whats this game?
do you have a screen shot for me?
BlackAura
DC Developer
DC Developer
Posts: 9951
Joined: Sun Dec 30, 2001 9:02 am
Has liked: 0
Been liked: 0

Post by BlackAura » Tue Oct 29, 2002 8:45 am

If it's supposed to run at 60FPS and it actually runs faster, I know of a better way to slow it down.

First off, you emulate a single frame using whatever... That's the emulator

Then, you wait for the video hardware to finish refreshing.

Some code from nxDoom (by way of crt0's DoomDC) which does this:

Code: Select all

void WaitVBL()
{
    volatile uint32 *vbl = ((volatile uint32 *)0xa05f8000) + 0x010c/4;
    while (!(*vbl & 0x01ff))
            ;
    while (*vbl & 0x01ff)
            ;
}
Hope that helps.
HyperG
DC Developer
DC Developer
Posts: 434
Joined: Sat Mar 23, 2002 6:57 pm
Location: U S A
Has liked: 0
Been liked: 0
Contact:

Post by HyperG » Tue Oct 29, 2002 3:36 pm

jeffma wrote:whats this game?
do you have a screen shot for me?
I got one .

Code: Select all


|     

            (=)        |


O the joy! :-p Look the DC homebrew scene has improved, awfully :-p . Anyways keep up the good work, I got tired of the lack of DC ram though.
If you think typing 'make' is hard, forget coding.
If you can't figure out the commands to DC-Tool, forget coding.
If you think coding is as easy as typing printf("Hello World\n"); , shoot yourself.
reaper2k2
DC Developer
DC Developer
Posts: 2648
Joined: Sun Mar 24, 2002 7:48 pm
Has liked: 0
Been liked: 0
Contact:

Post by reaper2k2 » Tue Oct 29, 2002 4:04 pm

how about

Code: Select all

60, DEFAULT_60HZ_VBLANK_DURATION,
	58, change from 1 to 58  its now its slow but still to fast
	0,
works fine to slow it down as thats is just cpu slices but its still to fast


i use what's been posted ill find a way to slow it

thanks later for now
Last edited by reaper2k2 on Tue Oct 29, 2002 9:53 pm, edited 2 times in total.
http://homebrew.dcemulation.com/dcgames/ *homebrew webbrowser games *

http://r2k2gate.topcities.com *dev site and my releases*
Image
Im' a Commodorian are you?
Cutman
DCEmu Junior
DCEmu Junior
Posts: 48
Joined: Wed Jan 16, 2002 7:32 pm
Location: Niagara Falls, Canada
Has liked: 0
Been liked: 0

Post by Cutman » Tue Oct 29, 2002 9:11 pm

reaper2k2
DC Developer
DC Developer
Posts: 2648
Joined: Sun Mar 24, 2002 7:48 pm
Has liked: 0
Been liked: 0
Contact:

OK

Post by reaper2k2 » Wed Oct 30, 2002 12:18 am

Thanks for the help the speed problem is now fixed

its about right now sound is a little better as well


http://dcdevr2k2.topcities.com/

thats it for now so get the last one for super speed or this one for normal speed like or close to the real machine


:wink:
http://homebrew.dcemulation.com/dcgames/ *homebrew webbrowser games *

http://r2k2gate.topcities.com *dev site and my releases*
Image
Im' a Commodorian are you?
Post Reply