It is currently Thu Oct 19, 2017 4:55 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 23 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Gamecube chiptune player
PostPosted: Sun Mar 30, 2014 12:22 pm 
Offline

Joined: Thu Oct 05, 2006 6:29 am
Posts: 911
I'm not sure if the Gamecube really qualifies as "retro" - but hey, it was released the same year as the Gameboy Advance.

In any case, I recently got an SD Media Launcher so that I can run my own code on the Gamecube, so I decided to write something. And what better to write than a chiptune player? :P

Here's the result:

Image

Download the DOL file if you want to run it on your own Gamecube (it also works quite well in Dolphin).
Or watch a YouTube video captured from my PAL Gamecube.

All the emulation code (6510, SID, YM2149) is my own. Audio is generated at 44.1 kHz mono and output using libasnd.

The UI is done in just about the least efficient way possible: I keep an offscreen 24-bit RGB buffer in RAM that I draw into. I then convert this buffer to the native framebuffer format (YUV 4:2:2) for every frame. It works well enough for what I needed, though.


Top
 Profile  
 
PostPosted: Mon Mar 31, 2014 9:52 am 
Offline
User avatar

Joined: Wed Dec 06, 2006 8:18 pm
Posts: 2801
Pretty cool. Are you planning to write more GameCube homebrew? I'd say it's getting to be retro or considered so.

I've thought about writing GameCube homebrew before, but I never looked into what tools and what if any libraries were available. I'm guessing SDL might have been ported? Though I prefer Allegro.


Top
 Profile  
 
PostPosted: Mon Mar 31, 2014 11:12 am 
Offline

Joined: Thu Oct 05, 2006 6:29 am
Posts: 911
There's something called cubeSDL, but I haven't checked it out myself. I don't know if Allegro is available. The only thing I can find when I do a web search is a bunch of polish-language pages :P

devkitPro includes a bunch of examples for various areas (graphics, audio, accessing SD cards, etc), so I just took one of the example projects and started adding my own stuff to it. Then it was as simple as running "make" and opening the resulting DOL in Dolphin.
I'm not sure what kind of debugging support there is, though. Dolphin appears to be geared more towards gaming. The Gamecube does at least seem to have some kind of memory protection enabled, because I managed to trigger some sort of exception handler early on during development that threw up a register dump on screen out of pure digust with what my program was doing.


Top
 Profile  
 
PostPosted: Tue Apr 01, 2014 9:27 pm 
Offline
User avatar

Joined: Wed Dec 06, 2006 8:18 pm
Posts: 2801
If I ever get around to it, I should look at this devkitPro with the examples. The GameCube seems like a reasonably capable system for alot of types of games. I suppose you could run a whole game off the SD card, loading whatever you needed into RAM as needed.


Top
 Profile  
 
PostPosted: Tue Apr 01, 2014 9:39 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19104
Location: NE Indiana, USA (NTSC)
And that really wouldn't be too different from how real games for FDS, GameCube, DS, and Wii work.


Top
 Profile  
 
PostPosted: Thu Apr 03, 2014 11:36 pm 
Offline
User avatar

Joined: Thu Jan 03, 2008 1:48 pm
Posts: 540
Possible to make a Wii port of this? Would be very useful.


Top
 Profile  
 
PostPosted: Fri Apr 04, 2014 12:54 am 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 6283
Location: Seattle
I've definitely booted gamecube .dol files directly on the wii using wiixplorer. I think I've done it using the homebrew channel netboot, too, but it's been long enough that I'm not certain.

Downside, I guess, is that you have to use the gamecube controller to control it.


Top
 Profile  
 
PostPosted: Fri Apr 04, 2014 2:07 am 
Offline

Joined: Thu Oct 05, 2006 6:29 am
Posts: 911
Quote:
Possible to make a Wii port of this? Would be very useful.

That's sort of the idea (that's where the 'W' in the name comes from). I might not add wiimote support though (i.e. you'd need a Gamecube controller). The only thing I'm unsure of right now is whether it's possible to write straight into the framebuffer on the Wii, or if I'll need to change how I display the GUI.


Top
 Profile  
 
PostPosted: Fri Apr 04, 2014 9:28 pm 
Offline
User avatar

Joined: Thu Jan 03, 2008 1:48 pm
Posts: 540
A lot of the Wii's these days don't have GameCube ports anymore and unless you do a lot of searching it's not easy to find one that does have them.


Top
 Profile  
 
PostPosted: Fri Apr 04, 2014 9:42 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19104
Location: NE Indiana, USA (NTSC)
Nintendo introduced the "Wii Family Edition", the first Wii revision outside Korea not to include GameCube support, in the fourth quarter of 2011. This means the first five years of used Wii consoles have GameCube support. The second Wii without GameCube support is the Wii mini, but that doesn't have an SD slot anyway so there's no way I can think of to run homebrew on it.


Top
 Profile  
 
PostPosted: Sat Apr 05, 2014 3:26 pm 
Offline
User avatar

Joined: Sun May 27, 2012 8:43 pm
Posts: 1306
B00daW wrote:
A lot of the Wii's these days don't have GameCube ports anymore and unless you do a lot of searching it's not easy to find one that does have them.

Perhaps where you live, but I can easily get a used Wii around here for $30 or so with gamecube ports. I still haven't seen in person one without them yet.


Top
 Profile  
 
PostPosted: Sun Apr 06, 2014 11:13 am 
Offline

Joined: Thu Oct 05, 2006 6:29 am
Posts: 911
I've updated the player with support for NSF (2A03 only) and VGM (SN76489 only) files. The number of panels in the GUI is static, so I only visualize the volume for the first 3 channels. However, the visual keyboard also shows the DMC channel, as well as the SN76489 noise channel when it's configured to output a square wave.

I've made a couple of additions to the controls as well: up/down on the analog stick can be used to scroll faster through the song list, and Z can be used to switch to solo mode (press repeatedly to select which channel to output).

Download the DOL here.
Watch a capture on youtube here.


Top
 Profile  
 
PostPosted: Sat Apr 12, 2014 6:26 am 
Offline

Joined: Thu Oct 05, 2006 6:29 am
Posts: 911
Support for GBS files has been added. It's still a bit buggy (in particular, I believe there's a problem with the envelope generators), and it currently doesn't emulate the sweep unit.

Download the DOL here.
Watch a capture on youtube here.


Top
 Profile  
 
PostPosted: Tue Apr 15, 2014 10:51 am 
Offline

Joined: Thu Oct 05, 2006 6:29 am
Posts: 911
The player now supports VRC6 and Sunsoft-5B audio (though not both at the same time). The S5B emulation is still a bit buggy, and my mixing of the expansion audio channels is probably not all that accurate.

Download the DOL here.
Watch a capture on youtube here.


Top
 Profile  
 
PostPosted: Tue Apr 15, 2014 3:18 pm 
Offline
User avatar

Joined: Sun May 27, 2012 8:43 pm
Posts: 1306
mic_ wrote:
The player now supports VRC6 and Sunsoft-5B audio (though not both at the same time). The S5B emulation is still a bit buggy, and my mixing of the expansion audio channels is probably not all that accurate.

Download the DOL here.
Watch a capture on youtube here.

If it would help, I can make some reference recordings of Akumajou Dracula and Gimmick! for native VRC6 and 5B sound. So far every emulator I've tried has poorly done the mixing and a lot of things do not sound right.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 23 posts ]  Go to page 1, 2  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group