friendofmegaman wrote:

Theoretically... could we leverage some parallel interface for that?

I had the idea of using a parallel port (IEEE 1284) interface a while ago but abandoned it because it seems the port isn't fast enough, even in EPP/ECP mode.  But having another think, could we use two four-bit serial-parallel shift registers (one for each pixel bit) connected to the data lines?  We would then connect the clock to a status line through a /4 clock divider, and the VS and HS signals to status lines, possibly with some circuitry to increase the pulse width.  We would still have to blindly sample on the PC and would end up with raw, unclocked data, but so far this sounds feasible to me.

Jazzmarazz wrote:
loop() 
{
Serial.print(PORTB); // where port B = 0, 0, 0, CLK, H, V, D1, D0
}

Don't you want PINB here?  And probably Serial.write() if you want raw data.

uXe wrote:

...are those pins available on the board though? and is there software library support for two SPI ports?

Right now I can't locate SPI1_SCK on the Pin Assignment table, but the other pins are broken out.  I haven't had any luck with software yet.  I tried btmcmahan's library in slave mode using the example code, but nothing happens (I was using an Arduino as the master).

uXe wrote:

Another option which does have support for two SPI ports is the good old Maple Mini, and it looks like they can be found pretty cheaply on eBay...

Thanks, I may look into this some time.

Jazzmarazz wrote:

Well, I was in the process of moving when this thread started and then I got a new job ... and more than a month later, I have my home office mostly set up. I can finally dedicate some time and effort into this project.

Great to hear you're set up in your new place and on board for the project.

Jazzmarazz wrote:

Also worth mentioning, I am working with a 16MHz arduino pro mini so I have to focus on sketch streamlining. The reason I set aside my Teensy is because they are expensive and anyone wanting to build this into a GB will be put off by the Teensy's price and size. I also think that the CPP to machine code conversion for the Teensy's CPU is worse than that of the atmega168.

I suspect you're right that Arduino code will be more efficient that Teensyduino code, but I have to agree with friendofmegaman that you're going to be very pushed for cycles, especially using an interrupt and doing a serial write straight away.

Jazzmarazz wrote:

Speaking of which, it mag be economical to test a serially clocked parallel-in, serial-out shift register and process all five pins on the PC.

Do you mean converting CLK, D0, D1, HS, and VS to serial data?  Do you plan to send this data to a microcontroller, or are you connecting the DMG to the PC through something else?

Jazzmarazz wrote:

I have to go grocery shopping before I can sit down and modify friendofmegaman's PC-side code...

You might want to use this version of the display code which I've modified to use Pygame instead of Pylab.  Pylab was extremely slow here...

#!/usr/bin/python
#author: friendofmegaman, rvan
#Display captured frame data on the PC.  Expects a 0x1E00 header and four
#pixels per byte.  Uses pygame, which is faster than pylab's scatter.

import pygame
from pygame.locals import *

upscale = 2

width = 160
height = 144

grey = []
grey.append((224,248,208))
grey.append((136,192,112))
grey.append((52, 104, 86))
grey.append((8, 24, 32))

fd = open('/path/to/screen.bin', 'rb')
data = fd.read()
fd.close()

frames = data.split('\x1E\x00')
print len(frames), 'frames'

class Pixel:
    x = 0;
    y = 0;
    def __call__(self, col):
        for upy in range(upscale):
            for upx in range(upscale):
                window.set_at(((self.x)*upscale+upx,
                               (self.y)*upscale+upy), grey[col])
    
        self.x +=1
        if self.x==160:
            self.x = 0
            self.y +=1

pixel = Pixel()
window = pygame.display.set_mode((width*upscale, height*upscale))

for frame in frames:
    # First and last frames can be smaller than that (because there's small
    # chance we start capture right at the beginning of the frame)
    if len(frame)!=5760:
        continue

    for y in range(144):
        for x in range(160):
            bit_offset = y*320+x*2
            array_offset = bit_offset/8
            byte_offset = bit_offset%8

            byte = ord(frame[array_offset])
            px = (byte>>byte_offset)&0b11
            pixel(px)

pygame.display.update()

quit = False
while not quit:
    event = pygame.event.wait()
    if event.type == pygame.QUIT or event.type == KEYDOWN and \
    event.key == K_ESCAPE:
        quit = True
Greenfields wrote:

When I put the cart inthe gameboy, small startup sound, black line flashes on the screen, the power led is on but then dims, then nothing...
The gameboy is working with a game cartridge, any idea what's missing?

You're right that you shouldn't need to flash a sav file.  Here are some things to try:

  • Put in fresh batteries

  • Test your lsdj.gb on an emulator to make sure it isn't corrupt

  • Clean your cartridge contacts (and the cartridge slot too, just in case)

  • Try another ROM on the cart

Do you see the Nintendo logo as the EMS cart starts to load, or do you see the "No Cart" black rectangle? If you got your EMS cart from Kitsch-Bent, it will probably have come with a small demo-ROM pre-flashed?  If so, did this work correctly before you tried flashing LSDJ?

53

(11 replies, posted in Nintendo Handhelds)

Quite impressive, both your setup and your video.  I'm curious how you captured the video from the Game Boy Camera.  Did you use a Game Boy Advance with a TV adapter?  Also, how do you find using the NES pads with your fingers?  I've always used my thumbs for LSDJ and other things on the Game Boy and imagine that using fingers would be slightly awkward (for me, at least).  But then again, perhaps I'm simply not used to it.

54

(82 replies, posted in Software & Plug-ins)

Domu wrote:

Can anyone speak about Mint linux? If theres any point going for that over plain Ubuntu? Ive heard its more geared towards begginers.

I've been using Linux for a dozen or so years and Mint on my main box for the last three years or so (although admittedly not with a standard desktop environment).  Linux Mint isn't specifically geared towards beginners compared to Ubuntu, but would present no more problems for a beginner either.  I previously used Ubuntu, but switched to Mint thanks to issues with later Ubuntu releases, and I suspect many long-term Ubuntu users have done the same.  Coming from a history of having used many distributions, including a number of years spent with Gentoo, I am pleased to say that I am more or less happy with Mint for a desktop system.

Arch also ranks highly in my books, especially its excellent documentation, and would probably be my third choice of distribution in general, after Mint and Debian, and I choose Debian over Arch primarily because I am more familiar with it.  I feel that Arch may seem a bit too much like diving in at the deep end for someone who hasn't used Linux before, but I would happily recommend Mint to someone new to Linux.

Thanks for your answers.  I look forward to reading your full write-up.  I have looked at a number of Z80 systems, both commercial kitsets and hobbyist builds, with eventual plans to building one myself.  What sets your design apart is the use of the Propeller as the GPU.  I'm not especially well-versed in Z80 graphics architecture (other than the Game Boy's, which I am passingly familiar with), but I would like to know about the interface between the Z80 and the Propeller.  Does the Z80 see the Propeller purely as a memory-mapped peripheral?

As for selling this as a commercial product (if you are still trying to), I think you are in for a hard task. Projects like this are mostly of interest to hobbyists (like ourselves) who like to build things rather than buy them, although you might have some success selling this as a kitset.  There are a number of kitsets out there for the Z80, but I have not seen many targeted towards video games as opposed to general-purpose microcomputer systems (although I haven't been looking for them specifically).  On the other hand, there are many, many video game console kitsets that are not specifically Z80-based.  This means that you are entering a more-or-less saturated market and will have to come up with a unique selling point.

56

(58 replies, posted in Collaborations)

Afrowolf wrote:

Am I the only one who straight-up enjoyed listening to his ramblings?

I enjoyed listening to this straight-up, too.  Alas, I don't have time to contribute at the moment, but I am looking forward to hearing what everyone comes up with.

Kumokoyda wrote:

1. I read somewhere that you neen somekind of "GB Transfer cable"(?) to transfer roms and saves from the computer to the card (and vice versa) - is this true? Or can you just use an odinary USB cable? Would I have to buy some extra stuff?

The EMS 64 USB Carts do indeed use a standard Mini-USB cable.  You might have been reading about the older non-USB carts, which plugged into a flasher which connected to the parallel port instead.

Dire Hit wrote:

4: This does function with the original gameboy, gameboy pocket, gameboy color, gameboy advance, and gameboy advance sp.

It's worth adding that while the cart will work on later Game Boys, it is still a Game Boy (not GBA) cartridge, so you won't be able to use GBA games/software.

stargazer wrote:
materiaxmedica wrote:

I don't trust unfinished software.  Also, having tested it myself, it's a mess even for alpha code.

Are you kidding me? This 'alpha' code is lightyears beyond the windows mess EMS ships. I've used it both in Ubuntu and OSX and it's never failed, been more reliable, and overall easier to use than that abomination of a windows driver.

I just want to step in to second this.  Calling Lacklustre's ems-flasher "a mess" hardly does it justice.  I don't know what issues materiaxmedica had, but I have used ems-flasher on Linux for a while with no issues.  (Note that it must be installed setuid root; I'm not sure if the documentation mentions this explicitly.)

58

(82 replies, posted in Software & Plug-ins)

I mostly use only my DMG for Chiptune creation, but use Linux (Mint, specifically) as my main operating system, and have tried out some Chiptune-related software, so can share my experiences.

materiaxmedica wrote:

... I've not been able to get WINE to behave with the necessary software to use the 64mb cart I got from nonfinite on this computer and have to resort to using my sister's old WinXP/7 rig for transfers from it to a thumb drive.

I use the third-party ems-flasher from lacklustre.net.  It must be installed setuid root, but works nicely.

I have also successfully used the following software:

  • Milkytracker, 0.90.85+dfsg-2.1, natively

  • LGPT, V1.1h_043, natively

  • GBDK, 2.96a, natively

  • Famitracker, v0.4.2, under WINE

  • bgb, 1.4.1, under WINE (This has some windowing / screen refresh issues, but otherwise works well.)

arfink wrote:

-Linux has some weirdness in Audio. Lots of people try to use JACK for the audio back-end, but support for JACK is very clunky and problematic. That said, OSS is even older and more junky. ALSA was the standard for a while in Debian-ish distros, but lately they have moved to Pulseaudio. This is where you'll see most of your audio compatibility issues. Some trackers assume OSS, some assume ALSA, some assume JACK, and most are so poorly maintained that you won't see Pulseaudio support. If you find ones that use OSS you may be out of luck. ALSA can be wrapped to work in Pulseaudio, and most *buntu types will do this for you seamlessly, but if not, check that out.

While the Open Sound System is no longer standard on most Linux systems, it is still maintained and still standard on BSD systems; I feel it hardly qualifies as "junky".  Nonetheless, on an ALSA-based system, programs that use OSS can be run fine with the aoss wrapper (or with padsp for Pulseaudio systems).

Also, I feel that it may not be the case that various trackers (and other audio programs) are poorly maintained, but rather that the developers feel it is not worth supporting (or not a good decision to support) Pulseaudio.  Since it became standard on Ubuntu-based systems, Pulseaudio has caused problems for many users who want to do more than listen to music, including myself.  I have since switched to a straight ALSA system, which solved these issues for me.  Although most people would not recommend removing Pulseaudio unless it causes problems, I would suggest considering a straight ALSA system in general.

Dadibom wrote:

You can use both outputs with an internal prosound mod too. The thing with the mod is that is simply bypasses the amp. The amp is there for a reason, to increase the volume. This means that without it, the volume will be very low and is therefore less suitable for headphone usage.

I understood that the point of an internal prosound was that it replaced the stock output.

The prosound does sound quieter through headphones than the stock output, but is still plenty loud enough, and I regularly use headphones with my prosound output quite happily.  Comparing stock and prosound side-by-side now and listening to Kirby's Dream Land, the main difference is substantially less hiss from the prosound output.  This is probably the biggest benefit you will get for listening to games.  My prosound is RCA post-pot.  You will certainly want post-pot for use with headphones, by the way.

I don't see why there is any harm in using a prosound-modded Game Boy for playing games, nor any reason why it would not enhance game soundtracks in the same way as it enhances other uses of the Game Boy's sound hardware, except that that game soundtracks often don't push as much out of the sound hardware and tend to not have as much bass.  Personally (aside from doing the mod myself), I'd go for an 1/8", rather than internal prosound, which gives you the option of using either output.

For a good comparison of prosound and original outputs, see Herbet Weixelbaum's page.

61

(6 replies, posted in Nintendo Handhelds)

Disappearing lines of pixels are not uncommon as the LCDs age, and can be fixed by the soldering iron method.  I have done so successfully, but have also had one screen which seemed beyond repair.  You will probably be in luck.  Take it very slowly.

As for the other issues, first of all back up your saves.  I suspect that some kind of power issue (most likely dying batteries) is responsible.

Some things to try:

  • Replace the batteries

  • Clean battery contacts / inspect for corrosion

  • Try an AC adapter

  • Clean your cartridge slot and contacts on the cartridge (probably not responsible for the slowdown, though)

  • If possible, try your LSDJ cartridge in another DMG

  • If you have a backlight, try disconnecting it

  • Check your SRAM battery (just in case)

If none of these work, or especially if disconnecting the backlight solves the issues, the answer may be a bad power regulator board.

Reading the Freescale Reference Manual, it turns out that the Teensy's chip does have two SPI ports.  We may yet be in luck...

BitCruncher wrote:

To tell a little bit more about myself, I'm starting an electronics business and I'm thinking of starting points ... I'm just thinking of start-up projects that people would actually buy.

This may just be me, but I would have appreciated if you'd said up-front that you were planning this as a business endeavor.  Nonetheless, I am interested to see what you come up with.

BitCruncher wrote:

You should check out the 8-bit console I built recently.

This looks quite interesting.  I would enjoy reading a detailed write-up if you are planning on making one.  I assume you are storing sprite data on the EEPROM and that this is copied to the Propeller's internal RAM on boot?  If so, is the Z80 involved in this process, or does the Propeller access the EEPROM directly?  Also, does your Cartridge ROM also contain your bootloader, or do you have a separate boot ROM?  I am aware this is off-topic for this thread, so you may wish to start a separate thread about this project.

Personally I feel that dedicated all-in-one solutions are conceptually in conflict with (at least a subset of) Chiptune as a way of music creation. For me, it is the limitations of using old hardware designed for playing video games (not designed for making Chiptunes) that gives much Chiptune music a great deal of its character.  This applies to me both as a listener and as an LSDJ user. I enjoy it when I can listen to a piece of music and think, "Wow, was that really 1xLSDJ?"  I have also heard here frequently that it is this same limited environment which provides (or augments) many artists' ability to be creative. While I have nothing against new electronic instruments, to me they wouldn't really be Chiptune, in the same way that, say, an analogue synth or a DAW isn't Chiptune.

That being said, I think there is a market within the Chiptune community for new and innovative hardware / software projects that push the limitations of the hardware we use, although such projects have been met with a variety of opinions.  For example the Ninstrument Synthboy has been somewhat controversial, while the Arduinoboy has been generally well-received (notwithstanding the confusion of some new users about the many modes).  I think staying true to the spirit of Chiptune is important, but also being part of the community in addition to wanting to give something to the community.