Search found 60 matches

by M-374 LX
Thu Sep 12, 2013 9:47 pm
Forum: Blabla
Topic: Positron Wave (musical project)
Replies: 0
Views: 1863

Positron Wave (musical project)

I am not only a programmer, but also a music producer. Therefore, I present you my musical project: Positron Wave , whose musical style is inspired by the synthpop, italo disco and similar movements from the 1980s. The music is entirely available under the Creative Commons Attribution license. The m...
by M-374 LX
Thu Sep 05, 2013 1:07 am
Forum: Sound
Topic: Unable to generate FM sound
Replies: 11
Views: 3740

What should one do if the 68000 needs to write to the YM2612 while the Z80 runs a DAC sample driver (which seems to be the case of the games that use the 68000 version of the SMPS sound engine)?
by M-374 LX
Wed Sep 04, 2013 4:16 pm
Forum: Demos
Topic: Crazy Driver (simple but complete game)
Replies: 15
Views: 12328

The audio on the real hardware is fine now. Thanks, Chilly Willy.

However, according to the Genesis Technical Overview document, the status of the YM2612 can be read from "any of the four locations". This seems to be another mistake in that document.
by M-374 LX
Tue Sep 03, 2013 9:49 pm
Forum: Demos
Topic: Crazy Driver (simple but complete game)
Replies: 15
Views: 12328

Here are some of the functions related to the audio: 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) ...
by M-374 LX
Tue Sep 03, 2013 7:47 pm
Forum: Demos
Topic: Crazy Driver (simple but complete game)
Replies: 15
Views: 12328

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...
by M-374 LX
Mon Sep 02, 2013 2:19 pm
Forum: Sound
Topic: Some questions about the Z80 and audio
Replies: 1
Views: 1671

Some questions about the Z80 and audio

1. How can DAC samples be played at the correct speed/timing? 2. Are the DAC samples signed or unsigned? 3. Should music sequence data be copied to the Z80 RAM or read by banking when the playback is controlled by the Z80? 4. Does anyone know the sample rate of the Z80 sound driver found with the S...
by M-374 LX
Thu Aug 22, 2013 10:48 pm
Forum: Demos
Topic: Crazy Driver (simple but complete game)
Replies: 15
Views: 12328

nolddor wrote:how many levels are the game?
The level number is stored as a byte. As a result, the level number could be up to 255 and wrap back to 1.

However, the last playable level in my tests was around 20.
by M-374 LX
Wed Aug 14, 2013 10:14 pm
Forum: Megadrive/Genesis
Topic: "undefined reference to `__udivsi3'"
Replies: 3
Views: 1463

Stef wrote:What tool do you use to compile your source ? the function should be included in sega.s boot file.
I use GCC under Linux.

The problem seems to be solved by linking one of the GCC libraries.

I found an "ldiv" label in the startup code.
by M-374 LX
Sat Aug 10, 2013 2:26 pm
Forum: Demos
Topic: Crazy Driver (simple but complete game)
Replies: 15
Views: 12328

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 avo...
by M-374 LX
Fri Aug 02, 2013 10:38 pm
Forum: Megadrive/Genesis
Topic: "undefined reference to `__udivsi3'"
Replies: 3
Views: 1463

"undefined reference to `__udivsi3'"

If I try to do a division and compile, I get the following message:

Code: Select all

undefined reference to `__udivsi3'
What is the solution?
by M-374 LX
Thu Aug 01, 2013 3:04 am
Forum: Tools
Topic: Simple JavaScript color tool
Replies: 0
Views: 1521

Simple JavaScript color tool

Here is a simple tool to find hexadecimal color values for the Genesis I have written in JavaScript: <html> <head> <script> function getColor() { var r = parseInt(document.getElementById('r').value); var g = parseInt(document.getElementById('g').value); var b = parseInt(document.getElementById('b')....
by M-374 LX
Tue Jul 30, 2013 8:42 pm
Forum: Sound
Topic: Unable to generate FM sound
Replies: 11
Views: 3740

Thanks, Eke. It works now.
Optimizations were not needed, Chilly Willy.
by M-374 LX
Tue Jul 30, 2013 8:15 pm
Forum: Sound
Topic: Unable to generate FM sound
Replies: 11
Views: 3740

Do you mean I should add the volatile keyword before the declarations of the pointers (in the C files that have direct access to the hardware) and compile those files with -O1? If so, it did not work.

I had success accessing the VDP without the volatile keyword or optimizations.
by M-374 LX
Tue Jul 30, 2013 6:36 pm
Forum: Sound
Topic: Unable to generate FM sound
Replies: 11
Views: 3740

Unable to generate FM sound

Here is my FM function to write a value to an FM register (part I only, as it is just a test): void write_fm(uchar reg, uchar val) { uchar* ctrl = (uchar*)0xA04000; uchar* data = (uchar*)0xA04001; while(*ctrl & 0x80); *ctrl = reg; while(*ctrl & 0x80); *data = val; while(*ctrl & 0x80); } And here, my...
by M-374 LX
Wed Apr 04, 2012 2:32 am
Forum: Tools
Topic: Time to update to gcc 4.6.2
Replies: 42
Views: 14649

My problems are now solved. It seems that I had those problems with sizes because of differences between GCC and SGCC. While an int is 32-bit in GCC, it seems to be 16-bit in SGCC. However, there is one more thing: I can only load tile data and maps from an array if it is const . May you tell me why?