Gameboy Development Forum

Discussion about software development for the old-school Gameboys, ranging from the "Gray brick" to Gameboy Color
(Launched in 2008)

You are not logged in.

Ads

#1 2008-10-30 20:31:28

freezedream
New member
From: Adelaide, Australia
Registered: 2008-10-20
Posts: 2

8-bit DAC in a gameboy cartridge?

Hi guys,

I'm new here and I also don't really know much about hardware or software (especially). However, I have been thinking about the idea of adding an 8-bit digital to analogue converter to a gameboy cartridge (i.e design a custom cart) along with the required analogue circuitry so that it would be possible to write some software whereby 8-bit samples (contained in the ROM or maybe some SRAM) could be played via the DAC. Is it possible to route the audio out through the Vin (pin 31) on the GB connector so the sound can play through the GB? I envisage the software eventually being able to do such things as cutting up breaks, retriggering, playing loops forwards and backwards and changing playback rate. There are some DACs available that have data latches and data can be written to the DAC in a similar way to an SRAM write.

So does anyone think this is do-able? As a musician, I would find such a cart very useful.

Offline

 

#2 2008-10-30 22:46:35

nitro2k01
Administrator
Registered: 2008-02-22
Posts: 244

Re: 8-bit DAC in a gameboy cartridge?

Welcome to the forums. smile

It is pretty doable, but it would take some work, obviously. You can attach a DAC, but you would need an additional controller of some kind for it. Or maybe a microcontroller like a PIC or AVR, with a builtin DAC. but honestly I don't think it would be worth the effort. I would recommend either using the wave channel of the DMG, which can output 4-bit waveforms with some tricky programming. (The sound will have some artefacts, and you can't really use pitch) Or write/look for GBA software, which can handle 8 bit sound + all the channels of the older Gameboys.

Since you say you're a musician, I assume you know Little Sound Dj already? If you add your own sample kits to it, it's a pretty competent sample player.


Blog: Gameboy Genius
"A journey of a thousand miles begins with one small step"
Old Chinese Proverb

Offline

 

#3 2008-11-05 23:07:09

freezedream
New member
From: Adelaide, Australia
Registered: 2008-10-20
Posts: 2

Re: 8-bit DAC in a gameboy cartridge?

Hmm..  Thanks for the reply. Yeah I have recently started playing around with LSDJ but the sound quality of the 4-bit samples leaves a LOT to be desired - it's just too lofi. Also, I don't have a GBA and little money so that idea is out really, plus I'd like to go fully 8-bit if possible. I have an 8-bit PIC with a lot of ports, and 8-bit ADC and DAC plus some SRAM which I was hoping to eventually make into an 8-bit sampler/looper once I get some time and find someone to write the firmware for the PIC!. I guess it's possible to include an interface port enabling the sampler to be controlled via a GB using a GB interface cart like that created by BoumPower.

Cheers.

Offline

 

#4 2008-11-06 01:14:50

www.BoumPower.ch
Member
Registered: 2008-04-04
Posts: 20
Website

Re: 8-bit DAC in a gameboy cartridge?

PIC16F877 on GB-PIC has ADC up to 12 bits of resolution. It's possible with a resnet to make an DAC, but they is no full 8 port available directely :-( . It's still possible to add an external DAC.
But I have no idea of the speed needed for this type of application.

Offline

 

#5 2015-02-17 11:48:09

doragasu
Member
Registered: 2015-02-17
Posts: 56

Re: 8-bit DAC in a gameboy cartridge?

I'm also interested about how you are supposed to drive cartridge port pin 31 (Vin). Schematics in the wiki show this pin is directly connected to pin 61 of LR35902 CPU. This looks a bit strange to me. If the signal in this pin is supposed to be mixed with the audio signal generated by the CPU, I think it makes more sense to mix the signals outside the CPU (e.g. using a simple resistor network).

Does anyone know about any commercial game or homebrew project that uses this pin? Or any site documenting exactly how you should drive it (impedance, voltage levels allowed, whether if you should drive it using analog signals or PWM, etc.)?

Offline

 

#6 2015-04-07 02:08:24

mikek
New member
Registered: 2015-04-07
Posts: 2

Re: 8-bit DAC in a gameboy cartridge?

i had the thought an attiny might run an fm via wavetable engine.  that said, an fm engine was integrated into the newest nanoloop 1 build/s?

Last edited by mikek (2015-04-07 02:08:40)

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson