[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Tinycc-devel] Greetings, and compilers/recompilers

From: Neil Bradley
Subject: [Tinycc-devel] Greetings, and compilers/recompilers
Date: Fri, 5 Nov 2004 13:19:07 -0800 (PST)

I'm new to the list and wanted to drop a line and say hello, and let
everyone know about a project I'm currently working on that presents many
of the same challenges as tcc does.

I'm a video game freak (I also own an arcade in Portland, Oregon) and I've
always been fascinated by compilers. I've written a few video game
emulators in my past, and thought it would be an interesting project to
make the jump from emulation to outright recompilation of code.

Some of you may or may not know that these old games use processors like
the 6502, Z80, 6809, etc... Sadly, even with better emulation capabilities
of platforms like the Gameboy advance, it's still not strong enough to
emulate games

So I set out on the trek of writing a recompiler - something that would
take Z80, 6502, etc... binary code and translate it back in to C. More to
the point, it would optimize and generate C code.

The good news is that it's up and working for a couple of Z80 games, both
with optimization turned on (Ms Pacman and Donkey Kong). Example output of
C code is here:


So how does this all tie in to tcc? I've compiled tcc to run under
FreeBSD, and in my test environment, I get a protection fault when I
attempt to compile mspacman (or Donkey Kong). ;-(

This is a really brutal tests of tcc, I'd suspect, simply because it's a
huge switch/case statement (look at the code to really understand why).

Anyone interested in debugging it? If so, I'd be happy to bundle up my
latest work and ship it off to whomever would like to look at it. Thanks!


Neil Bradley             "The true axis of evil in America is the brilliance of
Synthcom Systems, Inc.    our marketing combined with the stupidity of our
                          people.." -  Bill Maher

reply via email to

[Prev in Thread] Current Thread [Next in Thread]