New game

Hello

I am programming a multiplayer game for the sega saturn (previously named "saturn pong" by djidjo a few months ago), somewhere between bomberman and maelstrom.

Currently, I have 1 to 7 (or more) "players" (color squares), who can move, and collide with eachothers and drop "bombs" (killing rotating white triangles).

I now roughly (enough) understand the 3d functionalities of the SGL (I don't want to use sprites since I tried...), the pads management is no more a problem but the sound is still a mystery to me: the SGL tutorial assumes you have all sort of development tools on your mac; I don't have none of them. And I don't own a mac. I think there is a way to store simply a sample in a C array, wich can be made saving as raw in some sound editor, but I don't know the format.

Do you know about sound examples sources (using only PCM, or even the internal synthesizer) ?

Of course, the source is GPLed, so you can have a look at it (or change it, and so on). I can send an iso too, but I doubt it will look very impressive for now.
 
Wow sounds interesting. I can't help you with the sound stuff, I'm new to Saturn programming myself, but I'd be more than happy to offer my services for testing your game out. I have a multitap as well as enough controllers. Let me know when\if you need a tester.
 
I now roughly (enough) understand the 3d functionalities of the SGL (I don't want to use sprites since I tried...), the pads management is no more a problem but the sound is still a mystery to me: the SGL tutorial assumes you have all sort of development tools on your mac; I don't have none of them. And I don't own a mac. I think there is a way to store simply a sample in a C array, wich can be made saving as raw in some sound editor, but I don't know the format.


Yes, sprites can be a pain if you don't understand their restrictions. If not having the mac tools is your problem, set up an ftp and i'll give them to you. Otherwise consider using a program like sound forge that allows you to edit raw adpcm and try fiddling around with the sampsnd2 sample's pcm files(from the SGL) in sound forge until you figure out the format

Cyber Warrior X
 
CyberWarriorX, do you actually have the Mac sound tools? If so, could you please consider sending them to me (PM me for my email address) and I'll put them up with the rest of the stuff.
 
Ramirez 60 : Thanks for your help. It's ok for the testing. I'll send the game to you as soon as it will be really playable.

CyberwarriorX : I don't think I have this sampsnd32 from the SGL. May this file be the example I'm looking for for a few month...

About figuring about the format: each time I want to test someting I have programmed, I have to burn a cd-rw, so it could take a very long time. If you find examples (midi, pcm, etc.), please let me know.
 
you can test with an emulator, I've made an iso of a picture viewer and modified driving2 examples and my viewer works great on SSF and driving2 iso works on Satourne.
 
CyberWarriorX, do you actually have the Mac sound tools? If so, could you please consider sending them to me (PM me for my email address) and I'll put them up with the rest of the stuff.

I'd prefer an ftp instead as I can't send large attachments.

CyberwarriorX : I don't think I have this sampsnd32 from the SGL. May this file be the example I'm looking for for a few month...

http://www.emuxhaven.net/~translationnext/temp/sampsnd2.zip

I also included Bart's bin2c program which turns any binary into C code(so you can just attach it to your main program). You'll have to read up on the Pitch Register from the SCSP though to set the Pitch properly for your own game. Otherwise the pcm is basically just raw 8/16-bit, signed, big endian byte order audio.

you can test with an emulator, I've made an iso of a picture viewer and modified driving2 examples and my viewer works great on SSF and driving2 iso works on Satourne.

It's rather tough trying to test sound in an emu though(as no saturn emu supports sound yet) ;P

Cyber Warrior X
 
> I also included Bart's bin2c program which turns any

> binary into C code.

I did not try bin2c yet, but the sound now works ! Thanks.

Now I have another problem:

Since the PCM structure used to play a sample contains the channel on wich the sound is played and since it is set by the machine (not by me), I wonder how to play a sound many times simultaneously. Does I have to create as many PCM* than I will have to play ?

And a question:

What are the pro and cons of storing a PCM into the sound chip memory (with slDMA...) and not in the main memory ?

And a request :

Does sombody have a tool for creating a sound sequence, a DSP effect and the corresponding "map" structure for my PC ?

Thank you.
 
I did not try bin2c yet, but the sound now works ! Thanks.

No problem.

Now I have another problem:

Since the PCM structure used to play a sample contains the channel on wich the sound is played and since it is set by the machine (not by me), I wonder how to play a sound many times simultaneously. Does I have to create as many PCM* than I will have to play ?

That i'm not sure. You -may- have to create a few PCM structures. Try doing a test program that re-uses the same structure and see. Oh, and you may consider looking at slSndPCMNum. It's supposed to return either the amount of free PCM channels or an available PCM Channel number(I can't remember which) - Useful for what you're doing.

What are the pro and cons of storing a PCM into the sound chip memory (with slDMA...) and not in the main memory ?

I would imagine that the main con would be that the amount of memory dedicated to PCM data in sound memory is rather small(I think it's like 256k, check the SCSP manual) so you're limited in that way. Though from what I understood from the SCSP manual, it's far faster reading PCM data off the sound ram than work ram. So basically it makes more sense for quick, short, well used sound effects.

And a request :

Does sombody have a tool for creating a sound sequence, a DSP effect and the corresponding "map" structure for my PC ?

Yes, yes, and yes. All mac tools. Though you can easily write a map structure in a hex editor if you know the format(it's explained in the sound driver manual). As an interesting aside, any of you guys(Weston specifically included) know of any good Mac 68k debugging tools? I've been meaning to try reverse-engineering both the TON and SEQ formats but I don't know what I can even use.

Cyber Warrior X
 
Originally posted by CyberWarriorX@Sep. 18 2002, 12:41 am

What are the pro and cons of storing a PCM into the sound chip memory (with slDMA...) and not in the main memory ?

I would imagine that the main con would be that the amount of memory dedicated to PCM data in sound memory is rather small(I think it's like 256k, check the SCSP manual) so you're limited in that way. Though from what I understood from the SCSP manual, it's far faster reading PCM data off the sound ram than work ram. So basically it makes more sense for quick, short, well used sound effects.

There is 512k of sound RAM, but IIRC the SGL sound driver uses a fair chunk of it. Storing samples in sound RAM also has the advantages of not having to keep them in main memory and preventing bus contention (the SCSP and both VDPs sit on the "B" bus).

On the other hand, if you want to keep the samples in sound RAM you have to implement some sort of memory allocation scheme (unless SGL does it for you).
 
I now see the point of using this sound memory, altough I really don't undestand why the sgl creators did not program decent memory management routines. In the 90's !

This memory problem is the reason why I switched from sprites to 3d. I guess i'll eventualy have to face the problem.

I'll see if I can have access to a mac. Which model is enough for it ?

(btw, if I reuse the same structure, it doesn't work until the first playing is finished)

Thanks to you.
 
Originally posted by vreuzon@Sep. 18 2002, 5:31 pm

This memory problem is the reason why I switched from sprites to 3d. I guess i'll eventualy have to face the problem.

You must have quite an amount of graphics if you've managed to exhaust memory. Have you tried the obvious of reducing the amount of colours, and if you have video memory problems, transferring animation frames only as needed? Storing the graphics in main memory in a compressed format might also be worth trying.

Oh, and CyberwarriorX, do you know if the audio software runs under any Mac emulators?
 
There is 512k of sound RAM, but IIRC the SGL sound driver uses a fair chunk of it. Storing samples in sound RAM also has the advantages of not having to keep them in main memory and preventing bus contention (the SCSP and both VDPs sit on the "B" bus).

On the other hand, if you want to keep the samples in sound RAM you have to implement some sort of memory allocation scheme (unless SGL does it for you).

Yes I know, but iirc only the last half(perhaps less) of it is dedicated to raw PCM sounds. The first half is supposed to be used for SEQ, TON, and DSP data. I think that was more an SGL restriction.

I'll see if I can have access to a mac. Which model is enough for it ?

Straight from the main manual:

Hardware Requirements

-Macintosh IIFX or better

[half a dozen requirements for dev hardware related stuff snipped]

I think you also need like System 7.1 or something.

Oh, and CyberwarriorX, do you know if the audio software runs under any Mac emulators?

While I haven't tested all mac emulators, I do know it works fine under Basilisk II.

Cyber Warrior X
 
If I correctly understand the docs, slPCMOn cannot play PCM data located in the sound memory; if it was the case, then how to address it ? PCM has to be encapsulated in a sequence. Then I have no other choice than using the mac tools (with BasilicII).

CyberwarriorX : could you send me the sources of your picture viewer (I guess that the pictures are read from the cdrom. I could do the same - convert on the fly - for sounds and get rid of hexa C arrays) ?

Does somebody have contact with former saturn developpers ? Some usefull libs must have been written on the top of the SGL and it is silly to have to rewrite them.

I'll try to release someting until next week
 
antime wrote :

> CyberWarriorX, do you actually have the Mac sound tools?

> If so, could you please consider sending them to me (PM me for

> my email address) and I'll put them up with the rest of the stuff.

It would be a good idea ... I could simply use it, and why not, understand the whole structure.

Do you need an ftp ?
 
First I'd like to say that the name of your site is terrible !
smile.gif


I downloaded the binary and it doesn't work, neither with the real saturn nor with Satourne.

I have also downloaded the source, I will compile it when I have some time.

Your C files look clean (at least to me).

All I can say for now is : keep the faith
smile.gif
 
Salut Reinhart,

En fait, Vreuzon n'a pas testé le .bin dans l'émulateur Satourne. On suppose qu'il devrait tourner...

Par contre l'ISO (et non le .bin) devrait marcher sur une vraie Saturn (avec le swap trick si tu n'as pas de mod chip). Le country code est universel. Qu'obtiens-tu comme message d'erreur ?
 
Hello

Effectivement, je n'avais pas testé le .bin. Par contre, l'iso marche effectivement avec Satourne. Le code est un peu trop monobloc. Je vais essayer de modulariser un peu tout ca, histoire de rendre les choses plus claires et plus modifiables.

Et le cd+audio, ca donne quoi ?
 
Zut! Mais tout personne ici parle de francais? Parlez anglais, si'l vous plait. I'll ya beacoup de personne que vont compreendre pas q'es que vous allon dit...

(God, i'm really not used to the french verbal forms anymore. Nihon wa subarashi yo)
 
Back
Top