Crazy Driver (simple but complete game)
Moderator: Mask of Destiny
Crazy Driver (simple but complete game)
Crazy Driver is a simple homebrew driving game for Sega Genesis written mostly in C. Ports to Game Boy Advance and PC are also planned.
Gameplay
As the name suggests, you are a crazy driver in this game. All you want is to drive fast!
Crazy Driver is a simple driving game where you only need to avoid crashing into other cars. By driving faster, you get a higher score.
Controls
D-pad left/right: steer
A/B/C: accelerate like crazy!
Start: pause
Technical side features
•Usage of sprites and VDP planes A and B
•Vertical scrolling
•FM sound effects
•Music using FM, DAC samples and PSG
Screenshots
Video
This video shows the game running on the real hardware: http://www.youtube.com/watch?v=m-ydfPYw-jk
Download
v1.1: Link
v1.0: Link
Source code included in both links.
Gameplay
As the name suggests, you are a crazy driver in this game. All you want is to drive fast!
Crazy Driver is a simple driving game where you only need to avoid crashing into other cars. By driving faster, you get a higher score.
Controls
D-pad left/right: steer
A/B/C: accelerate like crazy!
Start: pause
Technical side features
•Usage of sprites and VDP planes A and B
•Vertical scrolling
•FM sound effects
•Music using FM, DAC samples and PSG
Screenshots
Video
This video shows the game running on the real hardware: http://www.youtube.com/watch?v=m-ydfPYw-jk
Download
v1.1: Link
v1.0: Link
Source code included in both links.
Last edited by M-374 LX on Wed Sep 18, 2013 11:06 pm, edited 3 times in total.
I have finally had the opportunity to test the game on the real hardware.
The PSG notes are fine in the music, but random FM notes are played instead of the desired ones. Besides, the engine sound effect can be heard sometimes, but not always, and the crash sound effect seems to be never heard. Does anyone know why this happens?
The PSG notes are fine in the music, but random FM notes are played instead of the desired ones. Besides, the engine sound effect can be heard sometimes, but not always, and the crash sound effect seems to be never heard. Does anyone know why this happens?
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
Here are some of the functions related to the audio:
Is anything wrong?
Code: Select all
void z80_halt()
{
volatile ushort* z80 = (ushort*)Z80_RESET;
*z80 = 0x100;
z80 = (ushort*)Z80_BUSREQ;
*z80 = 0x100;
while(*z80 & 0x100);
}
void fm_write(uchar reg, uchar val, uchar part)
{
volatile uchar* ctrl;
volatile uchar* data;
if(part == 0)
{
ctrl = (uchar*)FM_REG_1;
data = (uchar*)FM_DAT_1;
}
else
{
ctrl = (uchar*)FM_REG_2;
data = (uchar*)FM_DAT_2;
}
while(*ctrl & 0x80);
*ctrl = reg;
while(*ctrl & 0x80);
*data = val;
}
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
Yes - according to Sega, you must NEVER use the second part (as you call it) for reading the status. It will return not busy even when it is. ALWAYS read the status from the first part (0x4000). That's in the same bulletin as where they mention that the VDP isn't reset by the reset, so you have to check for DMA on reset before trying to use it or it may fail.
-
- Very interested
- Posts: 2440
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
I has been verified that status register is read from all addresses by other people and Yamaha OPN family docs also say that. Maybe there's more to the address decode that it seems on the MD around YM...
Mida sa loed ? Nagunii aru ei saa
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
Must be something to do with the Sega... maybe this is only an issue on models with the built-in FM rather than the discrete FM. If someone has a model with the separate YM2612, they could try the older version to see if it still has sound problems. But Sega's note on the FM is in response to an issue just like this one - "missing" or bad sounds, and is specifically stated to be the result of missing the busy status by reading the "wrong" register and getting a bad status.TmEE co.(TM) wrote:It has been verified that status register is read from all addresses by other people and Yamaha OPN family docs also say that. Maybe there's more to the address decode that it seems on the MD around YM...
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm