I always loved the SNES. For me it was the last piece of hardware on which i enjoyed gaming. Nothin hit me again like Mario Kart or Yoshis Island. But that’s a different story.

Since my Amiga 500 days i loved to programm in ASM, but never really had the opportunity to code lately,since x86 ASM is really awful to code. But 68000er ASM was always fun. So the SNES could be a good target? Yep ! The Snes uses a pimped up 6502, called 65816. It’s faster, uses 16-bit operations and has 24bit address space. To get some code running on the SNES i used the WLA Assembler. So what does is look like ?

    ldx.w   #plane_0         ; assign vram location $1000 to $2116/7
    stx     $2116
    ldx     #$0000

    lda.w   text_0,x        ; get ascii text data
    and     #$3f            ; we only want the first 64 characters
                            ; convert ascii to c64 screen code
    sta     $2118
    stz     $2119           ; clear unwanted bits, no h/v flipping
    cpx     #$0400          ; transfer entire screen
                            ; $20*$20=$0400  (1024 bytes)
    bne    init_plane_0_loop 

Yo, old skool. So i started to write a little Amiga Cracktro Style demo. I setup my devel enviroment using the WLA Assembler and vanilla Makefiles. Since i didn’t get my Super Wild Card Backupstation working, i tested the code against ZNES Emu. Also i wrote some python scripts to generate sine tables and copper bar includes. I made some color gardients with GIMP and converted then into asm includes to use then as raster interrupt lookuptables. Hm i think it took me week from start reading the 65816 specs, till i had this little thingy running. It’s far away from optimal code. Sometimes it’s jerking and no sound also. But so what, my first SNES release and iam proud that i got something runing on that machine. Learned how use HDMA tables and about Nintendo’s weired memory map (what is a zero page ???never had an C-64)….So what did come out? Have look at it.

Snes Snes Snes

Picture 1

Picture 2

Picture 3


Leave a Reply

Your email address will not be published. Required fields are marked *