Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Programming Language for Coin ops

8 views
Skip to first unread message
Message has been deleted

Mark (UK)

unread,
Mar 27, 2004, 5:49:12 AM3/27/04
to
Hiya!

It's assembler for sure. Early 80s and before games would have to be
written in machine code, as compilers like C produce too much bloated
code which is too slow.

Go dig out some info on the 6502, Z80, and 6809 CPUs - that will get you
started.

Yours, Mark.

Patrick de Albuquerque wrote:
> I was curious if anyone knows for certain what programming languages
> coin ops operate under. I have looked this up on the group and
> assembly seems to be a reaccuring theme, but no one seems to know for
> sure. Is there ways of offloading these programs from the various
> Eproms? Are there ways of modifying these programs that are currently
> on EPROMs? I am interested in learning about this but I am at a loss
> on where to start. I have intermediate knowledge of VB.NET and Java.
>
> I appreciate any help,
>
> Patrick de Albuquerque

Steph

unread,
Mar 27, 2004, 6:32:43 AM3/27/04
to

Definitely Assemler code.

As Mark (UK) pointed out, there weren't very many compilers back then
(..I don't even think C was alive back then, we're talking Pascal,
Fortran and Cobol years ).

As such, if you wanted any kind of performance, it was all assembler code.

Thankfully, these 8-bit processors had a fairly simple instruction set.

I believe the 6502 is the simpler of them all.

That's what was on my Commodore-64 at the time,
and I fiigured it out on my own (...as a 16 yr old hacker no-less ! )

If you've never used assmebler code, it's VERY different than today's
high-level language.
You need to understand binary numbers pretty well, and know how to shift
bits around.
You'll need a good starter book...

..but it's kinda fun.

Good Luck.
Steph
Ottawa, Canada

---

news.gsu.edu

unread,
Mar 27, 2004, 8:44:07 AM3/27/04
to
I actually like assembler more than the higher level languages. I am
re-teaching my self assembly now and he is right, learn your
binary/decimal/hex conversions until they are automatic. Drink lots of
coffee too!

(Programmers are machines that turn coffee into code)


"Steph" <s_s...@SPAMTHIShotmail.com> wrote in message
news:vDd9c.12459$k4F1...@news01.bloor.is.net.cable.rogers.com...

Message has been deleted

Steve Muccione

unread,
Mar 27, 2004, 10:41:34 AM3/27/04
to
Your best bet would be to take a look at mame... they have a built in
debugger, and the ability to emulate the processor (with a great, great deal
of precision) makes things quite easy to fool around with.

You'll have to dis-assemble (going from the e-prom code to a mnemonic
listing (human readable)... however, this will NOT have any symbols int it
and will be very difficult to decipher). Luckly, many of the early games
were very small, so doing an instruction trace isn't an impossible job, just
very difficult... be prepared to take prodigious notes).

You'll need a cross-assembler (on the generates code for a system other then
the one it is currently running on). These are available on the web...

I STRONGLY suggest you don't attempt to develop on a game board. Many of
the designers had instruments called ICE's (in circuit emulators)... they
basically replaced the CPU and allowed the developer to trace program
execution and find and fix bugs. You wouldn't have any access to this
while running on a game board and hence will not know when anything goes
wrong. Modern CPU's have this capability via a system called JTAG (joint
test access group)... which basically sets up a bunch of scan chains that an
external device can examine and toggle within the cpu... they simply add
scan chains to the registers, etc to allow for debugging.

I first tought myself 6502 assembly at age 10... but I had a KIM-1 board
(basically a 6502, hex pad, and 2k of ram... it also allowed me to single
step throught the execution of my code). (NOTE: I just ran and dug
throught my basement and found out that I still have the KIM-1!!! yeah!!!
damn the thing is old now....) It was good back then, but you had to
manually enter your program by selecting addresses and keying in the values
by hand (this was real machine code... you had to hand assemble it!)

again, check out mame if you're really interested in this type of thing.

steve


"Patrick de Albuquerque" <pdealbu...@yahoo.com> wrote in message
news:6858a794.04032...@posting.google.com...
> Mark and Steph,
>
> Are there any current books on assembly language you would suggest?
> Is it possible to recode eproms with any routines I come up with.
> Provided Im doing it on a blank one? Steph, am I bidding on one of
> your auctions for that eprom burner?
>
> Pat de Albuquerque


Andy J.

unread,
Mar 27, 2004, 11:42:48 AM3/27/04
to
Just a quick question. I've read that mame uses the actual programs from
arcade games. Can these programs be purchased from some mame site and then
burned onto the rom's for an arcade?

"Patrick de Albuquerque" <pdealbu...@yahoo.com> wrote in message
news:6858a794.04032...@posting.google.com...

Alex Yeckley

unread,
Mar 27, 2004, 1:54:56 PM3/27/04
to
> I first tought myself 6502 assembly at age 10.

You beat me by one year :-) I was 11, and it was 6809 on
a CoCo. Still have mine too...

Alex
----
ayec...@elektronforge.com
www.elektronforge.com


Message has been deleted

Jeff Kulczycki

unread,
Mar 27, 2004, 5:27:56 PM3/27/04
to
http://www.jeffsromhack.com/toolbox/index.htm

Here's a some quick tips to get you started.

-Jeff


--
http://www.jeffsromhack.com
Customize Your Arcade

Patrick de Albuquerque wrote:

> Is it possible to write assembly code for earlier CPU's on a pentium
> or celeron grade computer or do you need to write on the cpu you are
> developing for?(for example an 8086 computer).How are you able to
> transfer code you write onto a chip? Is there a tool for this?
>
> Pat de Albuquerque

Dave W

unread,
Mar 27, 2004, 5:59:38 PM3/27/04
to
pdealbu...@yahoo.com (Patrick de Albuquerque) wrote in message news:<6858a794.04032...@posting.google.com>...

> Mark and Steph,
>
> Are there any current books on assembly language you would suggest?
> Is it possible to recode eproms with any routines I come up with.
> Provided Im doing it on a blank one? Steph, am I bidding on one of
> your auctions for that eprom burner?

Yes, you can erase eproms and keep reusing them. Use mame for most of
your development but burn a set of roms periodically so that you can
check it. Mame is not 100% accurate. It's fairly easy to write a
program that runs in mame but won't run on a board.

Jeronimo has a lot of useful programming information. I've been
meaning to post the source code to a working game for a long time.

James Sweet

unread,
Mar 27, 2004, 7:28:04 PM3/27/04
to

"Steph" <s_s...@SPAMTHIShotmail.com> wrote in message
news:vDd9c.12459$k4F1...@news01.bloor.is.net.cable.rogers.com...
>
> Definitely Assemler code.
>
> As Mark (UK) pointed out, there weren't very many compilers back then
> (..I don't even think C was alive back then, we're talking Pascal,
> Fortran and Cobol years ).
>

C was developed in the early 70's, but certainly wasn't used to make coin op
games, as others have said, they were all done in assembler for the specific
CPU.


James Sweet

unread,
Mar 27, 2004, 7:30:52 PM3/27/04
to

"Patrick de Albuquerque" <pdealbu...@yahoo.com> wrote in message
news:6858a794.04032...@posting.google.com...
> Is it possible to write assembly code for earlier CPU's on a pentium
> or celeron grade computer or do you need to write on the cpu you are
> developing for?(for example an 8086 computer).How are you able to
> transfer code you write onto a chip? Is there a tool for this?
>
> Pat de Albuquerque

It sounds like you have a *very* steep learning curve ahead of you, you can
write code on whatever machine you want, just so long as an assembler is
available to turn your code into a machine readable hex file. Your best bet
may be to start with something like PIC or AVR microcontrollers, there's a
great deal of information out there for them, and while the assembly
language will be different for any given processor family, the basic idea is
the same.


James Sweet

unread,
Mar 27, 2004, 7:32:23 PM3/27/04
to

"Andy J." <jaredj...@sbcglobal.net> wrote in message
news:cai9c.45169$wP3...@newssvr16.news.prodigy.com...

> Just a quick question. I've read that mame uses the actual programs from
> arcade games. Can these programs be purchased from some mame site and then
> burned onto the rom's for an arcade?

MAME does use the actual EPROM images, dunno about purchasing, but the
images are out there, if there's a specific game you want chances are
someone will send you the file. I've burned eproms a number of times from
these files to fix boards.


Steve Muccione

unread,
Mar 27, 2004, 8:17:27 PM3/27/04
to
Actually, if you took a poll I bet a great deal of the people who frequent
rgvac have gone and acquired the entire MAME rom list simply to get a hold
of the rom images to burn when fixing boards (I know I have.. came in damn
usefull a few times). I almost never play mame (except to take a quick look
at what some esoteric game is when deciding to buy the pcb or not), but
those rom image collections come in real handy.

steve

"James Sweet" <james...@hotmail.com> wrote in message
news:72p9c.110138$_w.1361369@attbi_s53...

Steve Muccione

unread,
Mar 27, 2004, 8:18:44 PM3/27/04
to
Yes, they are called cross-compilers and cross-asseemblers (a cross-xxx is
one where the target is different from the machien being written for).

You would "transfer" the code either via a pcb burner, or (if your lucky)
download the code to a rom emulator (really a bunch of ram) via an ICE.

steve

"Patrick de Albuquerque" <pdealbu...@yahoo.com> wrote in message
news:6858a794.04032...@posting.google.com...

Steve Muccione

unread,
Mar 27, 2004, 8:21:02 PM3/27/04
to
Lol... we're a dying breed... it's amazing how many people who claim to be
programmers have no idea how to actually address video memory or even read
and write to an io port.

I've been teaching my 8 year old to program, but have insisted that he start
on my old Atari 800 rather then a PC... he needs to understand the basics of
how a computer works before he get's all crapped out and lazy writing
windows code using api's that we're only half considered during their
creation.

steve

"Alex Yeckley" <ayec...@elektronforge.com> wrote in message
news:46k9c.17604$t16.9...@newssvr28.news.prodigy.com...

Clive@The Coin-Op Cauldron

unread,
Mar 27, 2004, 8:42:15 PM3/27/04
to
Patrick de Albuquerque wrote:
> I was curious if anyone knows for certain what programming languages
> coin ops operate under. I have looked this up on the group and
> assembly seems to be a reaccuring theme, but no one seems to know for
> sure. Is there ways of offloading these programs from the various
> Eproms? Are there ways of modifying these programs that are currently
> on EPROMs? I am interested in learning about this but I am at a loss
> on where to start. I have intermediate knowledge of VB.NET and Java.
>
> I appreciate any help,
>
> Patrick de Albuquerque

Look on our web site under 'The Laboratory', there's a whole bunch of
assembler and coding related tools their for free.

Clive
--
Board repairs. The Coin-Op Cauldron
Onsite/offsite game repairs. Easley, SC
Game & sound EPROMs. (864)238-1707
Game refurbishment & more... http://www.coinopcauldron.com

Jøhnny Fävòrítê (it means "halo, then resonate")

unread,
Mar 27, 2004, 9:21:42 PM3/27/04
to
Steve Muccione wrote:
> Lol... we're a dying breed... it's amazing how many people who claim
> to be programmers have no idea how to actually address video memory or
> even read and write to an io port.

that's pretty snobby, man. what happens when some guy from the fifties
enters the thread and claims that *you* don't know anything about
programming, because you don't know how to sort a deck of punched cards?

> I've been teaching my 8 year old to program, but have insisted that he
> start on my old Atari 800 rather then a PC...

great, you're wasting his time. very enlightened of you. better force
him to learn how to use a slide rule, while you're at it.

Message has been deleted

Scott Lawrence

unread,
Mar 27, 2004, 10:26:37 PM3/27/04
to
pac...@mailblocks.com (Dave W) wrote in message news:<47394dc8.04032...@posting.google.com>...

> Yes, you can erase eproms and keep reusing them. Use mame for most of
> your development but burn a set of roms periodically so that you can
> check it. Mame is not 100% accurate. It's fairly easy to write a
> program that runs in mame but won't run on a board.

Mame is FAR from 100% accurate, but still a very helpful tool. I've
written many things that run really well on MAME, but won't do
anything on real hardware.



> Jeronimo has a lot of useful programming information. I've been
> meaning to post the source code to a working game for a long time.

One of the most important resources I've found is other source code.
One of my side projects is documenting a ms. pac-man disassembly... I
recently got a *complete* pac-man disassembly which I am reviewing.

In any event, I basically started by using ZCC (a small-c (K&R)
variant that builds to z80 binaries. I'm currently using the
assembler that came with it (asz80) with a few extra extensions that I
have added myself. (The asz80 assembler is now used in the SDCC
cross-compiler) The problem I found was that asz80/zcc builds to
intel hex files, so I wrote a tool that converts them to binary and
outputs files based on a configuration file... so you can just type
'make', and it will generate rom images that MAME expects (boot1,
boot2, etc.)

I've also got my AGE/Turaco tools for editing graphics...

I started out making z80 from C, which was good for getting into it
quickly, for rapid prototyping... but the problem (as mentioned
earlier in this thread) is that it bloats the code intensely... the
runtime routines alone were around 1k, a simple if statement with four
conditionals worked down into 47 lines of asm that called those
runtime routines *a lot*.

C is a good way to start, but I don't recommend it for any final
products.

In any event, here's my page on the subject:

http://www.cis.rit.edu/~jerry/Software/pengo/

enjoy!

-Jerronimo

Steve Muccione

unread,
Mar 27, 2004, 10:29:38 PM3/27/04
to
Actully, learning how to use a slide rule is a very usefull skill. A fine
understanding of logarithms and their applications is quite usefull.

Acutally, my aunt used to be Schokley's bridge partner. She was one of the
very first programmers in the world when she was a physicist at Bell Labs.

However, something tells me that *YOU* don't know how to address video ram,
or what a slide ruler is used for and are trying to make up for a smaller
then average penis size.

You are certainly welcome to my opinion. But I will continue to instruct my
children such that they have a solid understanding of all the fundamentals
of physics, mathematics and logic necessary to compete and exceed the
efforts but forth by your children (should you happen to be able to save
enough money up to hire someone to have sex with you).

steve

"Jøhnny Fävòrítê (it means "halo, then resonate")" <thi...@fake.com> wrote
in message news:PM0003D6A...@minion.nashville.comcast.net...

Patrick de Albuquerque

unread,
Mar 28, 2004, 5:55:10 AM3/28/04
to
Everyone,

Thanks SO much. A person reading this thread can gain so much! I
can't put into words how much I apprecate it.

Thanks,

Pat de Albuquerque

Patrick de Albuquerque

unread,
Mar 28, 2004, 6:08:53 AM3/28/04
to
Steve,

I don't know if you are speaking about me in this post. I am only
trying to learn through personal interest, thats all. I don't claim to
be a programmer, I claim to know some languages. I just wanted to
address this in the case it was an issue. I know sometimes people can
take emails and posts wrong. Thanks for all your help.

Pat de Albuquerque


"Steve Muccione" <home*DOT*mucc...@verizon.net> wrote in message news:<2Mp9c.5012$XY4....@nwrdny02.gnilink.net>...

Scott Lawrence

unread,
Mar 28, 2004, 11:24:20 AM3/28/04
to
"Andy J." <jaredj...@sbcglobal.net> wrote in message news:<cai9c.45169$wP3...@newssvr16.news.prodigy.com>...
> Just a quick question. I've read that mame uses the actual programs from
> arcade games. Can these programs be purchased from some mame site and then
> burned onto the rom's for an arcade?

You might be interested in http://www.starroms.com/

You can legally buy the roms for the games they have there...

Although, technically, If you own the board that they go on, you
already have a license for those roms, so it's legal for you to have a
copy of those roms on your computer.

-js

Steve Muccione

unread,
Mar 28, 2004, 11:30:00 AM3/28/04
to
Pat,

No, not you at all... some Johnny Favorite character decided to chime in
with a snippy remark... I was just giving him a snippy remark back.

I fully support your desire to learn the fundamentals of computer
engineering.

I would still highly recommend trying stuff out in Mame... the one major
disadvantage that you will encounter is that game PCB's are in general not
documented. That is, you will have to hunt down and compile for yourself
information about various register and memory layouts. This can be quite a
duanting task unless you are already familiar with low level programming.

You might actually be better off buying yourself a comodore 64 or Atari 800
off of e-bay. They both use 6502's and are very well documented. You can
also get emulators for these machines on the web if you want to go that
route.

Best,

steve

"Patrick de Albuquerque" <pdealbu...@yahoo.com> wrote in message
news:6858a794.04032...@posting.google.com...

Rob Carroll

unread,
Mar 28, 2004, 1:34:59 PM3/28/04
to
"Jøhnny Fävòrítê (it means "halo, then resonate")" <thi...@fake.com> wrote
in message news:PM0003D6A...@minion.nashville.comcast.net...

> that's pretty snobby, man. what happens when some guy from the fifties


> enters the thread and claims that *you* don't know anything about
> programming, because you don't know how to sort a deck of punched cards?

Der. A deck of punched cards is to programming as a slate and chalk is to
reading. Utterly pointless attempt at a "dig".

> great, you're wasting his time. very enlightened of you. better force
> him to learn how to use a slide rule, while you're at it.

Typically stupid, uninformed, and immature response from you. Akin to
saying that children shouldn't learn the fundamentals of math because they
can just use a calculator.

Once he learns the building blocks of programming, his 8 year old will
(should, anyway) be a better coder than anybody who only knows high level
shit.

But, hey, I'll bet you're totally L33T. Download the source for Half Life 2
yet? Care to explain the code to us?


Clay Cowgill

unread,
Mar 28, 2004, 1:51:31 PM3/28/04
to
"Patrick de Albuquerque" <pdealbu...@yahoo.com> wrote in message
news:6858a794.04032...@posting.google.com...
> I was curious if anyone knows for certain what programming languages
> coin ops operate under. I have looked this up on the group and
> assembly seems to be a reaccuring theme, but no one seems to know for
> sure.

Assembly was certainly the most common 'language' up until the mid-1980's.
Depending on the company doing the development it switched over to 'C'
pretty fast. (All Atari's System 1 stuff, Gauntlet, and Vindicators on up
were mostly 'C'.) Now there's a lot of C, C++, and a even a handful of
things like Flash getting used on PC based platforms.

-Clay


Vizilla

unread,
Mar 28, 2004, 4:30:15 PM3/28/04
to
I am fairly sure steve was tearing into Jøhnny Fävòrítê. Not you
patrick. Oh and Jøhnny Fävòrítê is probably some asshole somewhere who
a complete moron. Only a moron would say those things about
programming and slide rules.

-isaac

pdealbu...@yahoo.com (Patrick de Albuquerque) wrote in message news:<6858a794.04032...@posting.google.com>...

Patrick de Albuquerque

unread,
Mar 28, 2004, 5:45:06 PM3/28/04
to
Steve,

Thanks for your help. I know I am coming in late in the game but it
sure is fun getting my feet wet.

I appreciate your help,

Pat


"Steve Muccione" <home*DOT*mucc...@verizon.net> wrote in message news:<c4D9c.6372$hS3....@nwrdny03.gnilink.net>...

Commander Dave

unread,
Mar 29, 2004, 12:19:02 AM3/29/04
to
I'm breaking one of my rules for not replying to these type of emails to
say: Don't feed the trolls... that is what they live for.

-Commander Dave

"Jøhnny Fävòrítê (it means "halo, then resonate")" <thi...@fake.com> wrote
in message news:PM0003D6A...@minion.nashville.comcast.net...

Commander Dave

unread,
Mar 29, 2004, 12:40:22 AM3/29/04
to
Hello again Patrick!

It really sounds like you got the arcade game collecting fever! Prepare to
have your house stuffed with games, be perpetually broke and your wife nag
you about all the space they take up! ;-)

I wanted to throw my two cents in about the programming older arcade games.
I have disassembled a decent part of Wizard of Wor and have reprogrammed it
to do various things. I showed you the video RAM test program and how I can
make it say anything I want. It did take me a long time to learn enough to
make it happen, but that what a hobby is for.. having fun!

One language that was missed (I think) was Forth. I know for a fact that
Gorf was programmed at least partially in a language called Terse, which was
an inhouse derivite of Forth.

I contaced the programmer of Gorf and asked about it and she still has the
original Terse manual and software (if it is readable) and I think a full
listing of Gorf. When she was moving, she said that if she came across it
that she would send it to me (at least to copy). Unfortunatly, I didn't hear
back and she won't reply to my emails now. I am guessing that she has no
interest in things done in the past and just wants to work in the 'modern'
world. I can't blame her for this... my guess is that she gets bombarded by
email and calls from we collectors all the time. Probably is annoying as
heck.

But I got off track there. The other game, Wizard of Wor, I had always heard
that it was programmed in pure assembler. As I got deeper into the code, I
started noticing some weird programming practices. The further I went the
stranger it got. I think the term someone used was "Funky a** code". Then I
got to thinking about the structure, and it looks like it may have been
written in Terse (or another Forth like) programming language! I haven't
been able to figure out how to contact programmers listed for Wizard of Wor.
One is the famous Dave Nutting and the other was a guy named Tom McHugh.
Dave is so famous he probably wouldn't even acknoledge my existance
(probably gets bugged more than the Gorf programmer) and I have never found
any other references to Tom McHugh.

Anyway, besides assembly language there was at least one "high level"
language that was used to program coin-op classics.

Well, spouted on enough. I'll see if I can get a web site going like Scott
"Jerry" Lawrence's hacking page, even though I don't have near the
information he does. By the way, Scott was the original inspiration for
disassembling WOW and starting me on the path to insanity. Thanks Scott! :-D

Cheers,
-Commander Dave

"Patrick de Albuquerque" <pdealbu...@yahoo.com> wrote in message
news:6858a794.04032...@posting.google.com...

Andy J.

unread,
Mar 29, 2004, 10:30:59 AM3/29/04
to
Thanks for the help.

"Scott Lawrence" <sdlpci...@cis.rit.edu> wrote in message
news:1a0d10b5.04032...@posting.google.com...

Scott Lawrence

unread,
Mar 29, 2004, 4:30:26 PM3/29/04
to
"Commander Dave" <cmdr...@spamcop.net> wrote in message news:<106fdm7...@corp.supernews.com>...

> Well, spouted on enough. I'll see if I can get a web site going like Scott
> "Jerry" Lawrence's hacking page, even though I don't have near the
> information he does. By the way, Scott was the original inspiration for
> disassembling WOW and starting me on the path to insanity. Thanks Scott! :-D

Huzzah! :D

The Tempest Documentation project was the inspiration for my mspac doc
project. :)

But as for general hacking, you can blame the old emulators (Sparcade,
KEM) as well as Ivan Mackintosh for getting me started... And of
course, all of the encouragement and help from Dave Caldwell, Dave
Widel, Mowerman, Marcel Silvius... and recently, Spaeth, Juice, etc...

It's a lot of fun. :)

-s

Martin White guddler.co.uk>

unread,
Mar 29, 2004, 7:10:26 PM3/29/04
to
> Lol... we're a dying breed... it's amazing how many people who claim to be
> programmers have no idea how to actually address video memory or even read
> and write to an io port.

It's amazing how many of us programmers don't know how to do such things
because we simply don't need to and don't care how to! It's called
progress. APIs and other programming tools exist these days to handle the
low level stuff so we can get on with functionality and other stuff.

The low level stuff still there to be worked on if you WANT to :O)

Clive@The Coin-Op Cauldron

unread,
Mar 29, 2004, 8:09:35 PM3/29/04
to
Martin White

>>Lol... we're a dying breed... it's amazing how many people who claim to be
>>programmers have no idea how to actually address video memory or even read
>>and write to an io port.
>
>
> It's amazing how many of us programmers don't know how to do such things
> because we simply don't need to and don't care how to!

...you don't care to because the embedded software engineer has already
written all the boot, time critical and raw I/O bit-level code before
you. You are able to code using your API because the other guys did the
low level stuff. It's got nothing to do with progress. :)

wadel...@hotmail.com

unread,
Mar 30, 2004, 9:13:13 AM3/30/04
to
"Clay Cowgill" <cl...@yahoo.com> wrote in message news:<S8F9c.24977$w54.162321@attbi_s01>...

I was wondering if someone would finally say it. I didn't notice
Patrick say he wanted to learn how to write classic games from 20+
years ago. He just asked about video games. As far as I know, most
modern games are written with (gasp!) high-level languages. There is
absolutely no need for him to learn assembler unless he wants to do so
for academic reasons. There sure are a lot of egos in this group.

Wade

Steve Muccione

unread,
Mar 30, 2004, 9:57:08 AM3/30/04
to
Sure.. you don't *need* to... just like you don't have to understand the
fundamentals of how your car works... but when you break down in the middle
of no-where and have no idea how to fix the problem (or even how to describe
it properly to someone who can help you fix it) then you are certainly at a
disadvantage.

You can't ever have to much knowledge. Having an intimate understanding of
why operating systems work a certain way can do nothing but help you. How
many programs could run more efficiently if people used spin locks to handle
concurrency issues on multi-processor systems. The problem is that 99% of
the programmers out there don't even know the issues revolving around the
need for such a device or how it is different from a regular mutex.

Where do you stop... do you not learn about avl trees because you haven't
ever need them... how do you know you didn't need them unless you know they
existed?

Maybe it's just me, but I like to know as much as I can about the things I
am working on.

steve

"Martin White guddler.co.uk>" <martin@<nospam> wrote in message
news:eU2ac.25466$h44.3...@stones.force9.net...

Steve Muccione

unread,
Mar 30, 2004, 12:17:55 PM3/30/04
to
Humm... If you at the start of the thread you'll notice that he was
interested in modifying the e-proms. Irregardless of the language used to
write the game, any modifications to the e-proms will have to be done in
assembly... at least a bit of patch code to transition to C, but now we're
talking mixed-mode which can make things even more complex.

I'd like to understand how he would be able to patch existing eproms without
a knowledge of assembly.

steve

<wadel...@hotmail.com> wrote in message
news:7f994dbd.04033...@posting.google.com...

Martin White guddler.co.uk>

unread,
Mar 30, 2004, 12:57:26 PM3/30/04
to
> I'd like to understand how he would be able to patch existing eproms
> without a knowledge of assembly.

It really does depend entirely on what you want to do to the eproms. I've
hacked a few games (okay, two, i shouldn't exaggerate!) to change their
controls or invert the screen. I don't know any assembler.

I just use the debug console in mame and the C source code of the mame
drivers to pull up the memory map and then play with the code until it does
what i want it to do.

A bit like when hackers (or is it crackers?) used to (and still do) hack
protection on modern titles.

Mame is a fantastic thing and we really would be in the dark ages without
it. - And yes, before anyone jumps on me, i know mame wouldn't exist
without people that understand assembler, but again it doesn't mean i need
to know all the internals personally!

Martin.


Clay Cowgill

unread,
Mar 30, 2004, 2:13:27 PM3/30/04
to
"Steve Muccione" <home*DOT*mucc...@verizon.net> wrote in message
news:7Zhac.13340$XY4....@nwrdny02.gnilink.net...

> Humm... If you at the start of the thread you'll notice that he was
> interested in modifying the e-proms. Irregardless of the language used to
> write the game, any modifications to the e-proms will have to be done in
> assembly... at least a bit of patch code to transition to C, but now we're
> talking mixed-mode which can make things even more complex.

Well, that might be reading a bit more into his question than he originally
intended. ;-) But sure, even for patching it's totally possible to just
jump out to a 'C' stub in EPROM, especially if you wanted to add stuff like
menu options or soft-dipswitch settings where 'C' can make a 2-day assembler
project about 2 hours... (Hop to your code, do all the big 'C' stuff, stick
a few values in RAM shadows and hop back.)

> I'd like to understand how he would be able to patch existing eproms
without
> a knowledge of assembly.

To a lesser extent I'd agree with that, but the fact is that you don't need
to "write" much in assembly for patches... nor do you even really need to
know all the machine architecture or instruction set. I spent a lot of my
younger years hacking Atari 800 protection and whatnot-- I could bumble
along though startup code and figure out roughly what was going on enough
that I could flip a bit here and there to change the outcome of a
conditional branch or whatever. I certainly didn't have the chops to
*write* an assembly language program back then, nor would I say I had
anything more than a cursory knowledge of assembly. I never really did
'get' indexing or indirect addressing back then, but I didn't need it most
of the time.

(Even now I can *read* German, but I suck at writing it-- don't know all the
words, don't recall the right syntax, etc.)

Anyway, you're all wrong. The game is executing "machine code". Assembly
is just the more human-friendly language abstraction of the machine code.
;-)

If you're going to be patching things though it's really helpful to be aware
of what language the game may have been written in-- if only because it'll
help understand the assembly code you'll probably have to look at. Knowing
the language type of origin can give you some built-in functionality to
exploit (C's love of the stack for parameter passing for example).

We used to have our commercial software get cracked by various Russian
hacker types and we'd always get a laugh out of them-- they'd explain
everything they had to do including our "tricky and obfusicated protection
code" in assembly. In actually it was just stock C++ code, but by the time
you looked at the resulting disassembly there were big RAM based structures
and all sorts of crap getting passed around in memory that made it *look*
protected. ;-) If you knew it was C++ and took a step back to look at the
code it was much, much more clear what it was actually doing. ("Oh, that's
just a pointer to that, and that's passing a reference to a structure with
some variables in it, this is just indexing into the structure to get the
variable it wants...")

-Clay

Patrick de Albuquerque

unread,
Mar 30, 2004, 2:46:30 PM3/30/04
to
Wade,

Thank you for responding to my original post. However, this
newsgroup is about collecting and fixing classic video games from 20
years ago. Certain members of this population are well versed in
programming. I had requested this programming information purely out
of self interest, knowing that many knew quite a bit about how these
games were programmed.

You see, I have a real interest out of reverse engineering the
embedded systems these games came from. I already knew that many of
these games were coded in assembly. My issues were how do I go about
reverse engineering these games in order to learn how they were
coded.How do I pull the programs off of the embedded systems they are
on and disassemble them so I can see how they are coded. It would
compare to reading classic literature in English class. You might add
that I might not had done well in this area, and I would agree with
you whole heartedly...but I digress. The powers that be have you read
and write on these topics so you can learn to better comprehend and
write. The same goes for learning assembly, and learning how these
programs were written.

From an outsider looking in a person might say that there are quite
a few people here that are rough around the edges. I have gotten to
know quite a few of them and I know that not to be the case. A
majority of these people who frequent this board would bend over
backwards in order to help an individuals intellectual pursuits.

Anyway, I've said enough. Each person on this thread has helped me
be a better more rounded person. One last thing...someone said, and I
can't remeber who to give them credit that help is not a right it is a
gift. That you all for your gifts!!!!!!!!

Patrick de Albuquerque

Mike

unread,
Mar 30, 2004, 3:07:42 PM3/30/04
to
>
> I was wondering if someone would finally say it. I didn't notice
> Patrick say he wanted to learn how to write classic games from 20+
> years ago. He just asked about video games. As far as I know, most
> modern games are written with (gasp!) high-level languages. There is
> absolutely no need for him to learn assembler unless he wants to do so
> for academic reasons. There sure are a lot of egos in this group.
>
> Wade


Why does it have anything to do with egos. He asked the question in
an arcade collecting news group. Its just a natural assumption that
he may be trying to write some code for some older games.

Martin White guddler.co.uk>

unread,
Mar 30, 2004, 6:26:39 PM3/30/04
to
Patrick,

To address just your very specific point of how to dissameble / reverse
engineer...

You may already know this bit, but grab yourself the source to mame and
compile it up with the debug flag set to 1. Vcmame is very good if you're a
Microsoft / Visual Studio person.

Then when you start a game, press the key you would normally press for the
volume control. You will get all the memory and disassembly you are
presumably looking for. You can also then save it to disk for further
perusal :O)

Hit F1 while in the debug console for command help etc.

I find this all extremely interesting too!

Martin.

James Bright

unread,
Mar 30, 2004, 8:08:30 PM3/30/04
to
pdealbu...@yahoo.com (Patrick de Albuquerque) wrote in message news:<6858a794.04033...@posting.google.com>...

> Wade,
>
> Thank you for responding to my original post. However, this
> newsgroup is about collecting and fixing classic video games from 20
> years ago. Certain members of this population are well versed in
> programming. I had requested this programming information purely out
> of self interest, knowing that many knew quite a bit about how these
> games were programmed.
>
> You see, I have a real interest out of reverse engineering the
> embedded systems these games came from. I already knew that many of
> these games were coded in assembly. My issues were how do I go about
> reverse engineering these games in order to learn how they were
> coded.How do I pull the programs off of the embedded systems they are
> on and disassemble them so I can see how they are coded. It would
> compare to reading classic literature in English class. You might add
>
> ... edits

Based on what you said above, don't limit yourself to just learning
the software. The hardware architecture contains a lot of valuable
information about the design of a given game, and without
understanding that you won't be studying the compete system. For
example, compare the way that Atari Centipede (or Milliepede) was
designed to how a Williams Defender system works.

Centipede is a great example because you have dedicated play field RAM
that contains characters (depending on what values are in a given
address space, a mushroom, partial mushroom, or nothing appears), and
then specialized RAM for dynamic sprites. A lot of stuff is done for
you in hardware, so it isn't too difficult to write a little bit of
code to manipulate characters on the screen. However that code would
be structured completely different that if you were trying to
accomplish something similar on the Defender platform.

At any rate, there a lot of neat things to learn about the games.
Depending on what you're trying to do (even if it's just hacking
around for fun) browsing the schematics can also give you cues on
what's going on.

Good luck. As you can see by the length of this thread, tinkering is a
popular activity!


--
JB

--James Bright
http://www.QuarterArcade.com
Restored Arcade Games for your Home

http://tech.QuarterArcade.com
Reference & debug material. WIP

Steve Muccione

unread,
Mar 30, 2004, 8:43:54 PM3/30/04
to
Patrick,

What James has just said is entirely correct. There are a great number of
hardware "accelerators" built into almost all of the games... from simple
sprite lists, to paralax scrollers, to multiple-cpu's and their
corresponding communication mechanisms. I don't want to scare you off, far
from it...

Like i've been suggesting, take a look at mame. Even the most simple
drivers give you a great deal of information about the hardware layout...
you can then do further research on each particular chip in that hardware
layout in order to gather information about how to manipulate it.

Best,

steve

"James Bright" <ja...@quarterarcade.com> wrote in message
news:34f35b53.04033...@posting.google.com...

Steve Muccione

unread,
Mar 30, 2004, 8:49:09 PM3/30/04
to
Clay,

Like I said, it is possible to stub a line and jump to a C routine...
however, unless you happen to know where to stick the stub (get lucky and
find where someone else has already inserted a patch for instance) you won't
really know what's happening unless you can follow the assembly. Further
more, if your code doesn't do what is expected then you really can't figure
out why if everythign else is a big black box.

I agree with you that he doesn't have to be an expert in order to inject
some simple patches, but certainly he will have to have more then a passing
knowledge (this is further complicated by the 6502's very limited addressing
modes (which includes branching) which makes patch design that much more
difficult)).

steve

ps: I also used to hack Atari 800 code... I found that I could write bad
sectors to a floppy by decreasing the rotation speed of the drive by
twiddling with the speed control pot. This way I could write the bad
sectors that 90% of the copy protection schemes worked with... a simply
copy program that just kept track of bad reads and did a second write after
I changed the pot was all it took.

"Clay Cowgill" <cl...@yahoo.com> wrote in message

news:rFjac.37657$K91.101847@attbi_s02...

Clay Cowgill

unread,
Mar 31, 2004, 1:46:03 AM3/31/04
to
"Steve Muccione" <home*DOT*mucc...@verizon.net> wrote in message
news:pspac.192$Bp2...@nwrdny02.gnilink.net...

> Like I said, it is possible to stub a line and jump to a C routine...
> however, unless you happen to know where to stick the stub (get lucky and
> find where someone else has already inserted a patch for instance) you
won't
> really know what's happening unless you can follow the assembly. Further
> more, if your code doesn't do what is expected then you really can't
figure
> out why if everythign else is a big black box.

Yeah, but also like I said, it depends on what you're doing. If you just
want a menu system or something to monkey with some values you might just
steal the reset vector (or NMI if it's unused) and not really even need to
know anything about the original code... In general though knowning at
least one assembly language would certainly be helpful.

> I agree with you that he doesn't have to be an expert in order to inject
> some simple patches, but certainly he will have to have more then a
passing
> knowledge (this is further complicated by the 6502's very limited
addressing
> modes (which includes branching) which makes patch design that much more
> difficult)).

YMMV. :-) I always found the 6502 about the easiest to patch/hack simply
because of the relative simplicity of the processor. (You know where the
stack is, there's no banked registers to worry about, the instruction set is
limited, etc...)

> ps: I also used to hack Atari 800 code... I found that I could write bad
> sectors to a floppy by decreasing the rotation speed of the drive by
> twiddling with the speed control pot. This way I could write the bad
> sectors that 90% of the copy protection schemes worked with... a simply
> copy program that just kept track of bad reads and did a second write
after
> I changed the pot was all it took.

Hee-hee... Yeah, me too. I hacked a little external switch that added a
resistor in parallel to the speed adjust on the Tandon mech in my Percom
drive to do the same thing. Ahhh, Disk Wizard II. ;-) To this day I still
count disk sectors in my head anytime I hear a floppy-drive stepping. I'll
probably do that to the day I die...

-Clay


wadel...@hotmail.com

unread,
Mar 31, 2004, 9:39:53 AM3/31/04
to
mp2...@hotmail.com (Mike) wrote in message news:<95cb88c1.04033...@posting.google.com>...

>
> Why does it have anything to do with egos. He asked the question in
> an arcade collecting news group. Its just a natural assumption that
> he may be trying to write some code for some older games.

His original question looked to me like more of a general question
about how games are written. Most assumed he was asking about the
games from 20 years ago, and they were right. :)

My comment about the egos was not about the assumption that Patrick
was asking about early 80's games. I'm referring to the numerous
comments suggesting that programmers who don't know low level
programming aren't "real" programmers, are lazy, aren't as effective
as those who know low-level programming, etc. Everyone is entitled to
his own opinion... but that certainly doesn't sound like comments from
a modest person. Clearly, there are a lot of experts here, and most
of them don't feel the need to toot their own horn.

Wade

Steve Muccione

unread,
Mar 31, 2004, 1:04:38 PM3/31/04
to
> Hee-hee... Yeah, me too. I hacked a little external switch that added a
> resistor in parallel to the speed adjust on the Tandon mech in my Percom
> drive to do the same thing. Ahhh, Disk Wizard II. ;-) To this day I
still
> count disk sectors in my head anytime I hear a floppy-drive stepping.
I'll
> probably do that to the day I die...

LMAO... yup... especially when it seeks to home... How old were you? I was
around 11 when I wrote the copy code... I was to scared to stick an inline
resistor (hell... scared the crap out of me the first time I broke the
paint-loc on the pot and suddenly my disk wouldn't read any more!).

steve

ps: index-indirect... indirect-indexed... my head still hurts...


"Clay Cowgill" <cl...@yahoo.com> wrote in message

news:LOtac.42012$w54.278368@attbi_s01...

Steve Muccione

unread,
Mar 31, 2004, 1:23:05 PM3/31/04
to
Wade,

Computer Science is one of the very few fields where practicioners often
function without a basic knowledge of that with which they are working on.
You never see an electrical engineer who doesn't understand ohm's law, or a
chemical engineer who doesn't comprehend the periodic chart and what it
means, or a physician who doesn't have a basic understanding of anatomy.

Maybe it's simply a lack of language. For many fields we have a number of
words to describe varying levels of compitance (EMT, Paramedic, Nurse,
Doctor). For computers there is only one... programmer.

Someone who writes just high level code is like an EMT... ok to put bandages
on (good for many things), but doesn't really know how get to and fix the
root cause of some of the more difficult problems.

Someone who has a complete grasp of the workings of a computer and the
operating systems is akin to a Doctor... someone who can take a holistic
view of the situation and grasp the interactions between components that
someone without that knowledge would not otherwise be able to do. This is
going to become increasingly more important as multi-threaded,
multi-processing systems become more in-vogue and the difficulties of
synchronization and protection demand a more detailed understanding of the
workings of the system.

steve.


<wadel...@hotmail.com> wrote in message
news:7f994dbd.04033...@posting.google.com...

Clay Cowgill

unread,
Mar 31, 2004, 10:58:44 PM3/31/04
to
"Steve Muccione" <home*DOT*mucc...@verizon.net> wrote in message
news:WKDac.2306$Lq4...@nwrdny01.gnilink.net...

> LMAO... yup... especially when it seeks to home...

"drrrrrrrrrrrrrr-dut-dut-dut-dut-dut..." I was severely disappointed to
discover that other computers did not 'beep' when reading from their floppy
drives too. The ST freaked me out for months 'cause I missed that
"bee-dee-dee-dee-dee" sound when the 800 booted. :-)

>How old were you? I was around 11 when I wrote the copy code...

Yep, 11/12 for me too. I bet my printout of the disassembly of the boot
sectors for "Baja Buggies" (first game I managed to crack) with all my
scribblings on it is probably still my my parent's basement somewhere. ;-)

> ps: index-indirect... indirect-indexed... my head still hurts...

No doubt! On the plus side, learning assembly by tearing apart a bunch of
self-modifying copy protection code on a 6502 makes pretty much everything
else look "normal"...

-Clay


Art Mallet - Artfromny - formerly A218@aol.com

unread,
Mar 31, 2004, 11:22:22 PM3/31/04
to
Gee, I know (or knew) how to program the old 029 IBM keypunch consoles to
automatically fill in the boilerplate fields on cards and then let the
operator fill in the stuff that varied card by card.
But I never did get the hang of the slide rule :)

--
Art


"Steve Muccione" <home*DOT*mucc...@verizon.net> wrote in message

news:CEr9c.5036$XY4...@nwrdny02.gnilink.net...
> Actully, learning how to use a slide rule is a very usefull skill. A fine
> understanding of logarithms and their applications is quite usefull.
>
> Acutally, my aunt used to be Schokley's bridge partner. She was one of
the
> very first programmers in the world when she was a physicist at Bell Labs.
>
> However, something tells me that *YOU* don't know how to address video
ram,
> or what a slide ruler is used for and are trying to make up for a smaller
> then average penis size.
>
> You are certainly welcome to my opinion. But I will continue to instruct
my
> children such that they have a solid understanding of all the fundamentals
> of physics, mathematics and logic necessary to compete and exceed the
> efforts but forth by your children (should you happen to be able to save
> enough money up to hire someone to have sex with you).
>
> steve


>
> "Jøhnny Fävòrítê (it means "halo, then resonate")" <thi...@fake.com>
wrote
> in message news:PM0003D6A...@minion.nashville.comcast.net...
> > Steve Muccione wrote:

> > > Lol... we're a dying breed... it's amazing how many people who claim
> > > to be programmers have no idea how to actually address video memory or
> > > even read and write to an io port.
> >

Steve Muccione

unread,
Apr 1, 2004, 8:51:24 AM4/1/04
to
My father INSISTED that I learn how to use a slide rule.... grrrr... I was
probably the only 11 year old who knew what log tables were...

"Art Mallet - Artfromny - formerly A2...@aol.com" <artg...@nycap.rr.com>
wrote in message news:2OMac.100491$KB.1...@twister.nyroc.rr.com...

Steve Muccione

unread,
Apr 1, 2004, 8:56:26 AM4/1/04
to
lol...

I was first in line to buy the ST when it first came out at the local
store... nearly had a heart attack because I messed up the check and I only
had one with me and the store would close before I could get back home to
get another one! Luckily I was able to make it work with some creative
overwriting :)

Never did get into the ST much though... ended up getting a PC just shortly
afterwards and that was that for the ST... eventually sold it off to a lady
who wanted to use it for midi stuff.

Still... there's never been a game as good as Star Raiders... The first time
I got Start Commander Class 1 I didn't turn the computer off for a whole
day... I just kept looking at the screen thinking "Yeah!! finally!!!"

best,

steve

"Clay Cowgill" <cl...@yahoo.com> wrote in message

news:UrMac.50653$w54.318309@attbi_s01...

wadel...@hotmail.com

unread,
Apr 1, 2004, 3:58:27 PM4/1/04
to
"Steve Muccione" <home*DOT*mucc...@verizon.net> wrote in message news:<d0Eac.2312$Lq4....@nwrdny01.gnilink.net>...

> Wade,
>
> Computer Science is one of the very few fields where practicioners often

...

Steve,

Everyone probably doesn't want to know my opinion, not to mention
it is pretty far off-topic (in an already large thread), so I'll email
you privately to continue this discussion.

Wade

0 new messages