• Ever wanted an RSS feed of all your favorite gaming news sites? Go check out our new Gaming Headlines feed! Read more about it here.
  • We have made minor adjustments to how the search bar works on ResetEra. You can read about the changes here.

delete12345

One Winged Slayer
Member
Nov 17, 2017
19,690
Boston, MA
According to the author:

The emulator I wrote is in the mgb/ directory and it uses SDL 1.x.

The source copy I have is closer to the Japanese version and the build
result merm.gb doesn't byte for byte match the released USA version, which
is readily available on rom download sites. I spent some time trying to
get the output to match but it's hopeless. I should have archived the code
associated with the final USA release so I could always rebuild it... but
oh well.

This person implemented their own SDL gbc emulator to facilitate faster testing, which while useful isn't exactly something we lack nowadays.

github.com

cgb/code at master · dashxdr/cgb

Color Gameboy Development stuff circa 2000. Contribute to dashxdr/cgb development by creating an account on GitHub.

Close if old. I did a search for "mermaid", thinking I'd get a hit, but nope.
 

Deleted member 12790

User requested account closure
Banned
Oct 27, 2017
24,537
looks at code/anim/anim.c

I'm never knocking a licensed game boy color game again.

most of that is just a rote SDL application, though. that's what tool development is like. That's not really GBC stuff, that's a PC application. The most gnarly part of that is just bitshifting and bitwise operations, because you're working on byte sized data on a retro machine like the GBC.

EDIT: Here's the good stuff, this is the actual game:

github.com

cgb/code/gb/usamerm/pin.asm at master · dashxdr/cgb

Color Gameboy Development stuff circa 2000. Contribute to dashxdr/cgb development by creating an account on GitHub.
 

Komo

Info Analyst
Verified
Jan 3, 2019
7,110
I just wanna mention that the THUG source code is also on github, so is Jedi academy and Outcast.
 

Deleted member 12790

User requested account closure
Banned
Oct 27, 2017
24,537
Are we able to compile this into a playable gb file?

yes, install z80-asm on your machine. You'll need to set up some environment variables in your linux distro to match his setup, then run the makefile. mimicing his toolchain would be the most annoying part, but not impossible.

EDIT: Oh, durr, he includes a specific assembler: https://github.com/dashxdr/cgb/tree/master/code/gbasm

just run make and put it in the appropriate directory, then run make in the usamerm folder and it'll generate a binary called merm.gb
 

Fularu

Member
Oct 25, 2017
10,609
This is pretty neat. Assembler and low-level programming is a lost art.
That's mostly because high level compilers are very, very efficient and compile your x language code into something close to machine language.

a good example is Oracle's PL/SQL which is a super simple logical programming language that's compiled into machine language by the database's compiler. Making it optimal (as long as your pl/sql is good that is, bad code will still compile as bad code)
 

Filipus

Prophet of Regret
Avenger
Dec 7, 2017
5,132
yes, install z80-asm on your machine. You'll need to set up some environment variables in your linux distro to match his setup, then run the makefile. mimicing his toolchain would be the most annoying part, but not impossible.

EDIT: Oh, durr, he includes a specific assembler: https://github.com/dashxdr/cgb/tree/master/code/gbasm

just run make and put it in the appropriate directory, then run make in the usamerm folder and it'll generate a binary called merm.gb

Looking at that code just gave me flashbacks of college semesters where I wanted to cry. Never again CS, I refuse to write in anything that is not human readable.
 

Fularu

Member
Oct 25, 2017
10,609
Looking at that code just gave me flashbacks of college semesters where I wanted to cry. Never again CS, I refuse to write in anything that is not human readable.
ASM is perfectly human readable, especially older chips like the Z80 and x68k

it's about knowing the instruction set and how to use it

x86 asm though... *shudder*
 

Filipus

Prophet of Regret
Avenger
Dec 7, 2017
5,132
ASM is perfectly human readable, especially older chips like the Z80 and x68k

it's about knowing the instruction set and how to use it

x86 asm though... *shudder*


Code:
dohitflipperboth:

        ldh    [hTmpLo],a    ;weaken amount

        ldh    a,[pin_x]

        sub    c

        ld    c,a

        ldh    a,[pin_x+1]

        sbc    b

        ld    b,a

        ldh    a,[pin_y]

        sub    e

        ld    e,a

        ldh    a,[pin_y+1]

        sbc    d

        ld    d,a

        push    bc

        push    de

        push    hl


Perfectly human readable is reaching but sure, there's a reason why I struggled and every other CS nerd cruised happily through assembly. We did do a bunch of x86 asm so trauma translates to all asm.