STORY   LOOP   FURRY   PORN   GAMES
• C •   SERVICES [?] [R] RND   POPULAR
Archived flashes:
229595
/disc/ · /res/     /show/ · /fap/ · /gg/ · /swf/P0001 · P2595 · P5190

A
Very
Merry Christmas!


<div style="position:absolute;top:-99px;left:-99px;"><img src="http://swfchan.com:57475/30487763?noj=FRM30487763-23DC" width="1" height="1"></div>

Flip8 - an emulator.swf

This is the info page for
Flash #72474

(Click the ID number above for more basic data on this flash file.)


Text

CHIP-8

5

PAUSE/RUN

FRAME SKIP

STEP

RESET

FLIP8
Flash Chip8 Emulator
by Newsdee
v. 0.5

Click circle
to change ROM

1

2

3

C

4

5

6

D

7

8

9

E

A

0

B

F

...

PC Keyboard
1 2 3 4
Q W E R
A S D F
Z X C V

DEBUG ON/OFF

http://newsdee.com/flip8/roms/test.bin

load remote

custom load:

S

chip8 logo

kaleid

pong

tapeworm

ufo

puzzle2

invaders

merlin

maze

hidden

guess

tetris

wipeoff

blitz

connect4

tank

tictac

vbrix

wall

vers

syzygy

squash

missile

puzzle

pong2

guess

breakout

Bonus: show me
Super Chip8 ROMs!

Bonus: show me
Super Chip8 ROMs!

Bonus: show me Super Chip8 ROMs!

(blinky)

(dragon2)

(race)

(ant)

(dragon)

(joust)

(spacefig)

(rocket)

(square)

SCHIP8 games
not playable yet!

Hap's test

Back to
Chip8 ROM list

Back to
Chip8 ROM list

Back to Chip8 ROM list

INFO

The Chip8 system could be considered as the Flash player of the 70's. It allowed making games and animations that would run on different machines.

Chip 8 was introduced by RCA in 1977 on the Cosmac VIP computer. The little blue machine ran at a whopping 1.7609 Mhz processing speed and had 2 KB of RAM storage.

It was a "hobby computer", sold at $275 that you had to build yourself!

NEXT

PREV

1/20

Over the years, CHIP8 has been
emulated in many devices.
This particular version was
coded in Actioscript 2.0, based
on Chip8 documentation.

Early game consoles such as the Atari 7600,
the Intellivision, or even the NES, were
programmed is a similar (albeit more
complicated) fashion. You thus can see what
hobbist game developers did back in the day
with the games and programs presented above.
Some of them are almost 30 years old!

The Chip8 became popular again
in the late 90s, as hobbist
HP48 calculator programmers not
only emulated but massively
enhanced the Chip8 platform.

The "Super Chip8 " (schip8) doubled the screen
resolution (128x64 pixels instead of 64x32),
introduced a few scrolling routines, and
allowed for larger sprites. This overhaul was
followed by much nicer looking games.
SCHIP8 support in this emulator is still being
worked on and about 70% done.

To understand how emulators
work, you need to know a few
things about "computer speech".
At their core, computers only
know about electricity.

Like a lightbulb, they only know if something
is on or off. All our modern computing power
is based on how we can encode enformation with
this premise. We call these basic atoms of
information "bits", which are either on or
off, either true or false, or as we commonly
write them, either 1 or 0.

As you can imagine, getting a
computer to do something with
just 0s and 1s would require a
lot of time furiously working
with a light switch...

To make the task easier, we can encode the
information in another format. If we group
four bits together (from 0000 to 1111), we can
make up to 16 possible combinations. We call
this group of bits a "nibble", and they can
contain any value from 0 to 15.

Using nibbles, we can reduce
four characters into two when
talking to the PC. But wouldn't
it be convenient if we could
use only one character?

Enter hexadecimal notation. It's a way of
counting numbers with sixteen fingers! That
is, you can go up to 15 before having to add a
character to the left, and going back to zero
with you first character. We write the "extra"
(from 10 to 5) with letter, i.e. A to F.
Starting to look familiar?

A nibble is still too basic to
represent many things. They are
therefore used in pairs, which
everybody knows as bytes. 8
bits allow up to 256 values.

Thanks to hexadecimal notation, we can write a
byte using two nibbles. This is why graphic
programs usually ask for color information in
hexadecimal. They encode each color component
with one byte, in RGB format (e.g. #FF003C)
This allows choosing one from more than 16
million possible colors!

Bytes are used by much  more
than colors. ASCII text encodes
each character in a byte. This
text uses one byte per letter,
space, or punctuation!

Computer programs are also written in
hexadecimal, what is commonly called "machine
language". Anything that a programmer writes
has to be converted to Machine Language before
the PC can run it. Even Actionscript!
But although every CPU will use hexadecimal,
they all understand a different flavour of it.
A PC won't understand a Mac.

An emulator is a program that
understand the machine language
of a CPU, and can translate so
another can run it instead.

In the past, most emulators were hardware
based. But today home PCs can emulate many
older systems purely in software. We make the
hexadecimal program believe that it runs on
its native environment by providing an
accurate simulation of what it can perceive
(guess where the Matrix got the idea).

In practice, we run a virtual
CPU that reads a program from
memory. The memory itself is
built to simulate the behavior
of the original chip.

Each address in memory is coded by a number
(like a mailbox). This measures how large
memory is; RAM of 1 MB means it has one
million mailboxes that contain one byte each.
The CPU will then go back and forth in memory
looking for the next instruction to run. How
complex or complicated these instructions are
depend on CPU.

Let's take as an example the
"goto" function in Chip8. We
need to tell the CPU to jump to
a specific location in memory
and continue to run from there.

Since "goto" is one of the native Chip8
commands, this is easy to do. Hex value #1e12
will tell the CPU to jump to addres "e12" in
memory. And that's it!
Notice how the command shown above is only two
bytes in length. Chip8 only recognizes
commands this long, which makes it easier to
read its programs.

You may have noticed that, if
you can only give commands
using four nibbles, the maximum
RAM 'mailbox address' you can
try to reach is "fff".

FFF is exactly 4KB of RAM though. Since the
original COSMAC VIP shipped with 2KB... that
was more than enough! The whole thing would
crash if you tried to read outside of memory
range. These sizes are laughable today (my
laundry washer packs more memory), but mere
kilobytes were expensive back them!

In addition to native commands,
the CPU needs to know where to
read and write information. The
most efficient way is to store
the values inside the CPU.

Every CPU has a set of special 'mailboxes'
where it stores temporary information. A few
commands will copy data to and from memory,
but every other command will never access RAM
directly. These are called registers. Modern
processors also have a "cache" - a few KB of
super fast RAM for more complex operations.

The Chip8 registers are fairly
simple. It has sixteen 8-bit
registers (called the Values),
and one 16-bit register used to
point to a memory mailbox.

Machine language progams then have to use the
registers as best as possible, using the CPU's
limited instruction set.
For example to sum 9 and 25 in Chip8 we would:
1) Set value register [0] to 9:  (#6009)
2) Add 25 to value register [0]: (#7019)
3) Copy result to memory at address FF:
(#A0FF then #F055)

Let's quickly analyze our
program. It was 8 bytes long,
but half of it was to write the
result to memory. Good thing
that we have many registers!

The first instruction (#6009) is decoded as
follows: [command][register][value].
6 is the "set" command, the register's name is
0, and the value to set is 9.
The second command (#7019) has the same
format. '25' is written #19 in hex.
The last two commands are a bit different.

The last two instructions are a
good example of different
command formats. (#A0FF).
[command][memory address].

This command tells the CPU to set its "memory
mailbox pointer" to a specific address.
Predictably, the next command tells the CPU to
write to whatever address is being pointed to:
(#F055) is: [command][register][save].
All the different formats are described in the
CPU's documentation.

This emulator effectively reads
each one of the CHIP8 commands,
and runs it on a virtual
machine. It also makes flash
simulate screen output.

You could actually write your Chip8 programs
and run them with this emulator if you were so
inclined. The sheer complexity of it would put
most off it though. Nonetheless, many like to
code in machine language (also called assembly
language) because of the challenge and high
performance that can be obtained through it by
a skilled programmer.

If you would like to see the
commands being decoded by the
emulator, you can activate the
debugger by clicking on the
appropriate button on the left.

The debugger will show you in real time what
is contained inside all the CPU registers. It
will also show the command it is currently
running. You will be able to see how complex
games such as Tetris make the CPU jump all
around memory. You can also use the debugger
to find out if a program is doing anything or
if it is waiting for keyboard input.

The Chip8's keyboard has 16
keys. They are mapped to keys
on the left of your keyoard
(see the cheat sheet under the
CHIP8 box on the left).

Since games were programmed in different
platforms, the keyboard layouts will be a bit
different. Presented here is the original
COSMAC VIP layout, but some games use the keys
a bit differently. Try to find out which keys
are being used if one doesn't work.

As a closing note, note that
Flash also uses a special kind
of machine language, and so the
Flash player is a bit like this
emulator.

The "bytecode" contained in SWFs are
hexadecimal commands converted from
Actionscript. It is even possible to write
Flash programs in assembly directly. You can
google for a program called "Flasm" which
allows you to write Flash programs directly in
bytecode. Somebody has even created quite an
impressive 3D engine using it!

TRY!

enter values between 0 and 255 then
click box

0

0

0

=

000

000

000

00000000

00000000

Decimal

Hex

Binary

00000000

0

0

0

000

000

000

00000000

00000000

00000000

0

0

0

00000000

00000000

00000000

000

000

000

trace window

V12

V14

V15

V13

V8

V9

V10

V11

V4

V5

V6

V7

V0

V1

V2

V3

PC

I

delay

sound

CPU

RAM

ActionScript [AS1/AS2]

Symbol 7 MovieClip Frame 1
stop();
Symbol 7 MovieClip Frame 2
stop();
Symbol 10 Button [pixel]
on (release, releaseOutside) { function validate(num) { if (isNaN(num)) { num = 0; } else if (num > 255) { num = 255; } else if (num < 0) { num = 0; } return(num); } function pad2(str) { return("00".substr(0, 2 - str.length) + str); } function pad8(str) { return("00000000".substr(0, 8 - str.length) + str); } var r = validate(parseInt(redB_txt.text, 2)); var g = validate(parseInt(greenB_txt.text, 2)); var b = validate(parseInt(blueB_txt.text, 2)); red_input.text = r.toString(); green_input.text = g.toString(); blue_input.text = b.toString(); redH_txt.text = pad2(r.toString(16).toUpperCase()); greenH_txt.text = pad2(g.toString(16).toUpperCase()); blueH_txt.text = pad2(b.toString(16).toUpperCase()); redB_txt.text = pad8(r.toString(2)); greenB_txt.text = pad8(g.toString(2)); blueB_txt.text = pad8(b.toString(2)); var color = new Color(redPix); r = r << 16; g = g << 8; color.setRGB(r); color = new Color(greenPix); color.setRGB(g); color = new Color(bluePix); color.setRGB(b); color = new Color(finalPix); color.setRGB((r + g) + b); }
Symbol 11 Button [pixel]
on (release, releaseOutside) { function validate(num) { if (num == Number.NaN) { num = 0; } else if (num > 255) { num = 255; } else if (num < 0) { num = 0; } return(num); } function pad2(str) { return("00".substr(0, 2 - str.length) + str); } function pad8(str) { return("00000000".substr(0, 8 - str.length) + str); } var r = validate(parseInt(redH_txt.text, 16)); var g = validate(parseInt(greenH_txt.text, 16)); var b = validate(parseInt(blueH_txt.text, 16)); red_input.text = r.toString(); green_input.text = g.toString(); blue_input.text = b.toString(); red_input.text = pad2(r.toString(16).toUpperCase()); greenH_txt.text = pad2(g.toString(16).toUpperCase()); blueH_txt.text = pad2(b.toString(16).toUpperCase()); redB_txt.text = pad8(r.toString(2)); greenB_txt.text = pad8(g.toString(2)); blueB_txt.text = pad8(b.toString(2)); var color = new Color(redPix); r = r << 16; g = g << 8; color.setRGB(r); color = new Color(greenPix); color.setRGB(g); color = new Color(bluePix); color.setRGB(b); color = new Color(finalPix); color.setRGB((r + g) + b); }
Symbol 12 Button [pixel]
on (release, releaseOutside) { function validate(num) { if (num == Number.NaN) { num = 0; } else if (num > 255) { num = 255; } else if (num < 0) { num = 0; } return(num); } function pad2(str) { return("00".substr(0, 2 - str.length) + str); } function pad8(str) { return("00000000".substr(0, 8 - str.length) + str); } var r = validate(parseInt(red_input.text, 10)); var g = validate(parseInt(green_input.text, 10)); var b = validate(parseInt(blue_input.text, 10)); red_input.text = r.toString(); green_input.text = g.toString(); blue_input.text = b.toString(); redH_txt.text = pad2(r.toString(16).toUpperCase()); greenH_txt.text = pad2(g.toString(16).toUpperCase()); blueH_txt.text = pad2(b.toString(16).toUpperCase()); redB_txt.text = pad8(r.toString(2)); greenB_txt.text = pad8(g.toString(2)); blueB_txt.text = pad8(b.toString(2)); var color = new Color(redPix); r = r << 16; g = g << 8; color.setRGB(r); color = new Color(greenPix); color.setRGB(g); color = new Color(bluePix); color.setRGB(b); color = new Color(finalPix); color.setRGB((r + g) + b); }
Symbol 16 MovieClip [test] Frame 1
#initclip 3 Object.registerClass("test", Chip8); #endinitclip
Instance of Symbol 39 MovieClip in Symbol 57 MovieClip Frame 1
onClipEvent (enterFrame) { var t = "1"; if (!Key.isDown(t.charCodeAt(0))) { this._alpha = 100; } else { this._alpha = 30; } } on (press) { }
Instance of Symbol 39 MovieClip in Symbol 57 MovieClip Frame 1
onClipEvent (enterFrame) { var t = "2"; if (!Key.isDown(t.charCodeAt(0))) { this._alpha = 100; } else { this._alpha = 30; } }
Instance of Symbol 39 MovieClip in Symbol 57 MovieClip Frame 1
onClipEvent (enterFrame) { var t = "3"; if (!Key.isDown(t.charCodeAt(0))) { this._alpha = 100; } else { this._alpha = 30; } }
Instance of Symbol 39 MovieClip in Symbol 57 MovieClip Frame 1
onClipEvent (enterFrame) { var t = "4"; if (!Key.isDown(t.charCodeAt(0))) { this._alpha = 100; } else { this._alpha = 30; } }
Instance of Symbol 39 MovieClip in Symbol 57 MovieClip Frame 1
onClipEvent (enterFrame) { var t = "q"; if (!Key.isDown(t.toUpperCase().charCodeAt(0))) { this._alpha = 100; } else { this._alpha = 30; } }
Instance of Symbol 39 MovieClip in Symbol 57 MovieClip Frame 1
onClipEvent (enterFrame) { var t = "w"; if (!Key.isDown(t.toUpperCase().charCodeAt(0))) { this._alpha = 100; } else { this._alpha = 30; } }
Instance of Symbol 39 MovieClip in Symbol 57 MovieClip Frame 1
onClipEvent (enterFrame) { var t = "e"; if (!Key.isDown(t.toUpperCase().charCodeAt(0))) { this._alpha = 100; } else { this._alpha = 30; } }
Instance of Symbol 39 MovieClip in Symbol 57 MovieClip Frame 1
onClipEvent (enterFrame) { var t = "r"; if (!Key.isDown(t.toUpperCase().charCodeAt(0))) { this._alpha = 100; } else { this._alpha = 30; } }
Instance of Symbol 39 MovieClip in Symbol 57 MovieClip Frame 1
onClipEvent (enterFrame) { var t = "a"; if (!Key.isDown(t.toUpperCase().charCodeAt(0))) { this._alpha = 100; } else { this._alpha = 30; } }
Instance of Symbol 39 MovieClip in Symbol 57 MovieClip Frame 1
onClipEvent (enterFrame) { var t = "s"; if (!Key.isDown(t.toUpperCase().charCodeAt(0))) { this._alpha = 100; } else { this._alpha = 30; } }
Instance of Symbol 39 MovieClip in Symbol 57 MovieClip Frame 1
onClipEvent (enterFrame) { var t = "d"; if (!Key.isDown(t.toUpperCase().charCodeAt(0))) { this._alpha = 100; } else { this._alpha = 30; } }
Instance of Symbol 39 MovieClip in Symbol 57 MovieClip Frame 1
onClipEvent (enterFrame) { var t = "f"; if (!Key.isDown(t.toUpperCase().charCodeAt(0))) { this._alpha = 100; } else { this._alpha = 30; } }
Instance of Symbol 39 MovieClip in Symbol 57 MovieClip Frame 1
onClipEvent (enterFrame) { var t = "z"; if (!Key.isDown(t.toUpperCase().charCodeAt(0))) { this._alpha = 100; } else { this._alpha = 30; } }
Instance of Symbol 39 MovieClip in Symbol 57 MovieClip Frame 1
onClipEvent (enterFrame) { var t = "x"; if (!Key.isDown(t.toUpperCase().charCodeAt(0))) { this._alpha = 100; } else { this._alpha = 30; } }
Instance of Symbol 39 MovieClip in Symbol 57 MovieClip Frame 1
onClipEvent (enterFrame) { var t = "c"; if (!Key.isDown(t.toUpperCase().charCodeAt(0))) { this._alpha = 100; } else { this._alpha = 30; } }
Instance of Symbol 39 MovieClip in Symbol 57 MovieClip Frame 1
onClipEvent (enterFrame) { var t = "v"; if (!Key.isDown(t.toUpperCase().charCodeAt(0))) { this._alpha = 100; } else { this._alpha = 30; } }
Instance of Symbol 61 MovieClip in Symbol 63 MovieClip Frame 1
onClipEvent (load) { _root.frames = 0; _root.oldtime = getTimer() / 1000; } onClipEvent (enterFrame) { var time = (getTimer() / 1000); var thistime = (time - _root.oldtime); if (thistime >= 1) { _parent.fpsCount.text = _root.frames; _root.frames = 0; _root.oldtime++; } else { _root.frames++; } }
Symbol 71 Button
on (release) { Chip8.path.loadFromFile(toLoad_txt.text); }
Symbol 75 Button
on (release) { _root.oldTvEffect._visible = !_root.oldTvEffect._visible; }
Symbol 77 Button
on (release) { Chip8.path.changeRom("c8pic"); }
Symbol 78 Button
on (release) { Chip8.path.changeRom("pong"); }
Symbol 79 Button
on (release) { Chip8.path.changeRom("ufo"); }
Symbol 80 Button
on (release) { Chip8.path.changeRom("kaleid"); }
Symbol 81 Button
on (release) { Chip8.path.changeRom("tapeworm"); }
Symbol 82 Button
on (release) { Chip8.path.changeRom("puzzle2"); }
Symbol 89 Button
on (release) { Chip8.path.loadFromFile(_global.sourceURL + "/roms/INVADERS"); }
Symbol 91 Button
on (release) { Chip8.path.loadFromFile(_global.sourceURL + "/roms/MERLIN"); }
Symbol 93 Button
on (release) { Chip8.path.loadFromFile(_global.sourceURL + "/roms/MAZE"); }
Symbol 95 Button
on (release) { Chip8.path.loadFromFile(_global.sourceURL + "/roms/HIDDEN"); }
Symbol 97 Button
on (release) { Chip8.path.loadFromFile(_global.sourceURL + "/roms/GUESS"); }
Symbol 99 Button
on (release) { Chip8.path.loadFromFile(_global.sourceURL + "/roms/TETRIS"); }
Symbol 101 Button
on (release) { Chip8.path.loadFromFile(_global.sourceURL + "/roms/WIPEOFF"); }
Symbol 103 Button
on (release) { Chip8.path.loadFromFile(_global.sourceURL + "/roms/BLITZ"); }
Symbol 105 Button
on (release) { Chip8.path.loadFromFile(_global.sourceURL + "/roms/CONNECT4"); }
Symbol 107 Button
on (release) { Chip8.path.loadFromFile(_global.sourceURL + "/roms/TANK"); }
Symbol 109 Button
on (release) { Chip8.path.loadFromFile(_global.sourceURL + "/roms/TICTAC"); }
Symbol 111 Button
on (release) { Chip8.path.loadFromFile(_global.sourceURL + "/roms/VBRIX"); }
Symbol 113 Button
on (release) { Chip8.path.loadFromFile(_global.sourceURL + "/roms/WALL"); }
Symbol 115 Button
on (release) { Chip8.path.loadFromFile(_global.sourceURL + "/roms/VERS"); }
Symbol 117 Button
on (release) { Chip8.path.loadFromFile(_global.sourceURL + "/roms/SYZYGY"); }
Symbol 119 Button
on (release) { Chip8.path.loadFromFile(_global.sourceURL + "/roms/SQUASH"); }
Symbol 121 Button
on (release) { Chip8.path.loadFromFile(_global.sourceURL + "/roms/MISSILE"); }
Symbol 123 Button
on (release) { Chip8.path.loadFromFile(_global.sourceURL + "/roms/PUZZLE"); }
Symbol 125 Button
on (release) { Chip8.path.loadFromFile(_global.sourceURL + "/roms/PONG2"); }
Symbol 128 Button
on (release) { Chip8.path.loadFromFile(_global.sourceURL + "/roms/BREAKOUT"); }
Symbol 134 Button
on (release) { gotoAndStop ("s8romlist"); }
Symbol 135 Button
on (release) { Chip8.path.loadFromFile(_global.sourceURL + "/roms/BLINKY"); }
Symbol 137 Button
on (release) { Chip8.path.loadFromFile(_global.sourceURL + "/roms/Dragon2"); }
Symbol 139 Button
on (release) { Chip8.path.loadFromFile(_global.sourceURL + "/roms/RACE"); }
Symbol 141 Button
on (release) { Chip8.path.loadFromFile(_global.sourceURL + "/roms/ANT"); }
Symbol 143 Button
on (release) { Chip8.path.loadFromFile(_global.sourceURL + "/roms/DRAGON"); }
Symbol 145 Button
on (release) { Chip8.path.loadFromFile(_global.sourceURL + "/roms/JOUST23"); }
Symbol 147 Button
on (release) { Chip8.path.loadFromFile(_global.sourceURL + "/roms/SPACEFIG"); }
Symbol 149 Button
on (release) { Chip8.path.loadFromFile(_global.sourceURL + "/roms/ROCKET"); }
Symbol 151 Button
on (release) { Chip8.path.loadFromFile(_global.sourceURL + "/roms/SQUARE"); }
Symbol 154 Button
on (release) { Chip8.path.loadFromFile(_global.sourceURL + "/roms/EMUTEST"); }
Symbol 159 Button
on (release) { _parent.gotoAndStop("romlist"); }
Symbol 161 MovieClip Frame 1
stop();
Symbol 177 MovieClip Frame 1
stop();
Symbol 180 Button
on (release) { nextFrame(); }
Symbol 182 Button
on (release) { prevFrame(); }
Symbol 223 MovieClip Frame 1
stop();
Instance of Symbol 184 MovieClip in Symbol 223 MovieClip Frame 1
onClipEvent (enterFrame) { var frame = _parent._currentframe; this.pageCounter.text = frame + "/20"; var pic = 1; if (frame <= 4) { pic = 1; } else if (frame <= 8) { pic = 2; } else if (frame <= 12) { pic = 3; } else if (frame <= 20) { pic = 4; } _parent.images.gotoAndStop(pic); }
Symbol 238 Button
on (release) { gotoAndStop ("inputDec"); }
Symbol 240 Button
on (release) { gotoAndStop ("inputHex"); }
Symbol 242 Button
on (release) { gotoAndStop ("inputBin"); }
Symbol 262 MovieClip Frame 1
stop();
Symbol 307 MovieClip Frame 1
stop();
Symbol 312 MovieClip [__Packages.Chip8] Frame 0
class Chip8 extends MovieClip { static var path; var video, state, pixChar, keyMap, V, delay, sound, S, memory, traceArray, I, PC, onEnterFrame, waitReg, romSize, schip8; function Chip8 () { super(); path = this; video = new Screen(); _global.trace = false; _global.showRegs = false; _global.fps = 6; _global.STOP = 0; _global.RUN = 1; _global.WAITKEY = 2; _global.sourceURL = "http://newsdee.com/flip8"; state = _global.RUN; _global.state = state; pixChar = "#"; keyMap = new Array(49, 50, 51, 52, 81, 87, 69, 82, 65, 83, 68, 70, 90, 88, 67, 86); V = new Array(16); delay = 0; sound = 0; S = new Array(); memory = new Array(parseInt("FFF", 16)); traceArray = new Array(); I = 0; PC = 512; setSchip8Mode(false); var _local4 = 0; while (_local4 < V.length) { V[_local4] = 0; _local4++; } var _local5 = "AS 2.0 SCHIP8 emulator by Newsdee "; _local4 = 0; while (_local4 < _local5.length) { memory[_local4] = _local5.charAt(_local4); _local4++; } _local4 = _local5.length; while (_local4 < PC) { memory[_local4] = "*"; _local4++; } loadRom(); initButtons(); video.create(path); onEnterFrame = speedCpu; } function reset() { PC = 512; setSchip8Mode(false); var _local2 = 0; while (_local2 < V.length) { V[_local2] = 0; _local2++; } while (S.length > 0) { S.pop(); } I = 0; video.clearScreen(); } function trace_debug(str) { traceArray.push((((("(PC:" + PC.toString(16)) + "|I:") + I.toString(16)) + ") ") + str); if (traceArray.length > 16) { traceArray.shift(); } } function printTrace() { if (!_global.trace) { return(undefined); } _root.infoPane_mc.tracer.text = ""; var _local4 = 0; while (_local4 < traceArray.length) { _root.infoPane_mc.tracer.text = _root.infoPane_mc.tracer.text + (traceArray[_local4] + newline); _local4++; } } function printRegisters() { if (!_global.showRegs) { return(undefined); } var _local6 = _root.infoPane_mc; _local6.pc_txt.text = PC.toString(16); _local6.i_txt.text = I.toString(16); _local6.delay_txt.text = delay.toString(16); _local6.sound_txt.text = sound.toString(16); var _local4 = 0; while (_local4 < 16) { var _local5 = ("v" + _local4) + "_txt"; _local6[_local5].text = V[_local4].toString(16); _local4++; } } static function step() { var _local3 = false; if (_local3) { var _local2 = getTimer(); var _local1 = 0; path.runCpu(); _local1 = getTimer(); _local2 = _local1; _local1 = getTimer(); _local2 = _local1; path.printTrace(); _local1 = getTimer(); _local2 = _local1; path.printRegisters(); _local1 = getTimer(); } else { path.runCpu(); path.printScreen(); path.printTrace(); path.printRegisters(); } } function initButtons() { _root.reset_btn.onRelease = function () { Chip8.path.reset(); }; _root.step_btn.onRelease = function () { if (_global.state != _global.STOP) { return(undefined); } Chip8.step(); }; _root.pause_btn.onRelease = function () { if (_global.state != _global.STOP) { _global.state = _global.STOP; _root.pause_btn.label.txt = "RUN"; } else { _global.state = _global.RUN; _root.pause_btn.label = "PAUSE"; } }; _root.speed_btn.onRelease = function () { switch (_global.fps) { case 1 : _global.fps = 6; break; case 6 : _global.fps = 11; break; case 11 : _global.fps = 21; break; case 21 : _global.fps = 41; break; case 41 : _global.fps = 1; } _root.fps_txt.text = _global.fps - 1; }; _root.debug_btn.onRelease = function () { if (_global.showRegs) { _global.trace = false; _global.showRegs = false; _root.infoPane_mc.gotoAndStop("tutorial"); } else { _global.trace = true; _global.showRegs = true; _root.infoPane_mc.gotoAndStop("debugger"); } }; } function checkForInput() { var _local3 = 0; while (_local3 < keyMap.length) { if (Key.isDown(keyMap[_local3])) { V[waitReg] = _local3; _global.state = _global.RUN; } _local3++; } } function speedCpu() { var _local7 = false; var _local6 = false; if (_local7) { var _local8 = getTimer(); } if (_local6) { if ((_local8 - _global.lT) > 60) { } } var _local4 = _global.fps; if (_global.state == _global.STOP) { return(undefined); } if (_global.state == _global.WAITKEY) { checkForInput(); return(undefined); } var _local3 = 0; while (_local3 < _local4) { runCpu(); if (_global.state == _global.WAITKEY) { break; } _local3++; } printTrace(); printRegisters(); var _local5 = getTimer(); if (_local7) { } if (_local6) { _global.lT = _local5; } } function runCpu() { var _local3 = readWord(); _global.lastOp = _local3; process(_local3); pcStep(2); ((delay > 0) ? (delay--) : null); ((sound > 0) ? (sound--) : null); if (PC > (1024 + romSize)) { onEnterFrame = null; trace_debug("end of ROM data - total: " + (1024 + romSize).toString(16)); printTrace(); } } function changeRom(name) { loadRom(name); reset(); process("00E0"); } function loadFromFile(location) { PC = 512; _global.sender = new LoadVars(); _global.receiver = new LoadVars(); _global.sender.location = location; _global.receiver.onLoad = function (success) { var _local2 = _global.receiver.data; if (_local2 == "err") { Chip8.path.loadData("c8pic"); } else { Chip8.path.loadData(_global.receiver.data); } _global.state = _global.RUN; }; _global.state = _global.STOP; reset(); System.security.allowDomain("newsdee.com"); _global.sender.sendAndLoad("http://newsdee.com/flip8/gateway.php", _global.receiver, "POST"); } function loadRom(name) { PC = 512; var _local2 = new Array(); _local2.pong = "6a026b0c6c3f6d0ca2eadab6dcd66e0022d4660368026060f015f0073000121ac717770869ffa2f0d671a2eadab6dcd66001e0a17bfe6004e0a17b02601f8b02dab6600ce0a17dfe600de0a17d02601f8d02dcd6a2f0d67186848794603f8602611f871246021278463f1282471f69ff47006901d671122a68026301807080b5128a68fe630a807080d53f0112a2610280153f0112ba80153f0112c880153f0112c26020f01822d48e3422d4663e3301660368fe33016802121679ff49fe69ff12c87901490269016004f0187601464076fe126ca2f2fe33f265f12964146500d4557415f229d45500ee80808080808080000000000000000000000000000000"; _local2.kaleid = "60006380611f620f2232a200f31ef00af0554000121c7301330012086380a200f31ef0654000121c73014300121c2232121e400272ff400471ff4006710140087201a2776ae08a126b1f81b23a0072016af08a226b0f82b23a0071016b1f81b2d1218a106b1f8b25dab16a3f8a15dab18b20dab100ee01800000000000000000"; _local2.c8pic = "00e0a2486000611e6200d202d21272083240120a6000613e6202a24ad02ed12e720ed02ed12ea258600b6108d01f700aa267d01f700aa276d01f7003a285d01f700aa294d01f1246ffffc0c0c0c0c0c0c0c0c0c0c0c0c0c0ff80808080808080808080808080ff81818181818181ff81818181818181808080808080808080808080808080ff818181818181ff80808080808080ff818181818181ff818181818181ffff000000000000000000000000"; _local2.tapeworm = "00e0a2061238ff80fb22222322222200ef2828ef28282800bda1a1b921203c000b0a0a0a0aaa5300ef28282f2a29e800b6aaa2a22222a20064006500661fd451d46174084440124a123ea25e6400653f6601d46ad56a760a461f126812528080808080808080808064086508a208d4577408a210d4577408a218d4577408a220d4577408a228d457a2307408d457a29212aaf7141494f70038a8b8b12a004eca4e42ee00eeaaee22ee0064116513d4557408a298d4557409a29ed4557408a2a4d455600fe0a112ca12c400e0651f660fa20767066802d5614f01130ef815f007300012de6002e0a167026004e0a167046006e0a167066008e0a16708470276ff47087601470475ff4706750112d66006f018600fe09e131400e012cc00000000"; _local2.puzzle2 = "6a126b01611062006000a2b0d127f0293000dab571087a0831301224611072086a127b08a300f01ef05570013010120a6a126b016c0062ffc0067002225272ff320012386e006e00f00a22527e017e01124884a085b086c0300212644501126475f876fc3008127045191270750876043006127c4412127c74f876ff30041288442a128874087601a300f61ef06581006000a300f61ef055a300fc1e8010f055f129d455dab58a408b508c6000eeee5efefefefefefefefe0000000000000000"; _local2.ufo = "a2cd69386a08d9a3a2d06b006c03dbc3a2d6641d651fd4516700680f22a222ac48001222641e651ca2d3d4536e0066806d04eda166ff6d05eda166006d06eda16601368022d8a2d0dbc3cd018bd4dbc33f001292a2cdd9a3cd013d006dff79fed9a33f00128c4e00122ea2d3d4534500128675ff8464d4533f0112466d088d524d08128c129222ac78ff121e22a27705129622a2770f22a26d03fd18a2d3d4531286a2f8f733630022b600eea2f8f833633222b600ee6d1bf265f029d3d57305f129d3d57305f229d3d500ee017cfe7c60f06040e0a0f8d46e016d10fd1800ee00000000000000000000000000000000"; _local2.antS8 = "120E5B20416E742076312E30205D00FF60FE6100AA10F155224C235C65006A016B006D006E0023683F0013C645FD12D047CC227A41FB14D041FC156841FA15E041F9162C600237CC24C612266E00A7F2FE1E602EF0557009617CAAE8D104600124C0600224C63E1F00FC7E013E20124E60046104AAF8D01000EE4B0022E67BFFAA12F165A7F2FE1EF0557E01621F8E2241FE12A441FF12AE7009627CAAE8FD1ED20400EE7007617CAB38D10400EE61004B0261084B0161104B006118AB18F11E617C7001D1087008AAE8FD1ED10400EE47CC73FCAD5CD340330073FC3300D340430065001230AA10F165700240FE231AF055A8124101A910F01EF165AA12F15562F082174F00131641FE132441FF132841FD132C13588B1000EE61016000AA10F15500EE6B0C00EE6B0400EE6B0165FD840074F96070ABDCD040600424C06360AD5CD340600224C0600224C6600124C06070ABDCD04000EE6B0100EE6600682E6C00AA68D68000EE6700242E23DE82C0600CE0A124666003E0A12486806037CC867481808894AA68F21ED01047CC00FCAA68FC1ED68000EE6700242E23DE82C0600CE0A1246647CC67046003E0A124868060867481808894AA68F21ED010AA68FC1ED68000EE6100D680600224C0600224C67101310713C8601E24C600FD600AE09E140C4A0000EE4A0123FE6A0269FCAA0EF065580000EE6A0069FE00EE600224C0808070ECAA0EF05500EE4A02142880602452980014248060700C24529800142400EE6A0100EE6A0069FE00EE4A0200EE600449FE6002890080602452980069008060700C24529800690049046A0000EE8056805680E4611F8012A7F2F01EF065810000EE60004C0060208C0080607010245280854F0000EE6704463867CC918014B200EE60404C4060608C00460000EE806070FC245280854F0000EE67FC918014A600EE8060245280874F0069FC00EE8060700C245280874F0069FC00EEF018805E14C6F015F007300014C800EE24E224F623983F0013C625104670153C14D4600124C0AA68FC1ED68076FCD680360014E200EE6309642565046018AB3CD0307014D0407014D0307014D04000EE43096504432565FCAB3C601881308354D010D0306040D010D030602C81408455D010D0406054D010D04000EE7D0400FCA7F2FE1E602AF0557009617CAAE8FD1ED104600124C0600224C67E014E206E0076FC3600153E122624E2257A258C23983F0013C64670153C156C6070610F62FE6300AA14F355AB5CD01000EEAA14F3658420420264FE42FE6402411125CC412125D482408430732043806300AB5CF41E84108124850070FCD540AB5CF31E3500D010AA14F355350000EE157A640442FC64FE00EE64FC420464024402F41800EE25F025FC23983F0013C6367015E2153C6370640F6500AD7CD34000EE8030700C245271F954102622803073FCAD7CF51E7520D010AD7CF51E3000D340300000EE15F0814074046002F01800EE24E2265C6E00266827483F0013C6467017D62646600324C616344D0016D04D0216F64D0416A84D0616804D08172E1740636864276500ABDCD34000EE6B006500AA54FE1EF0658D007E014E146E004D08171C00EE6427825075204540650080307304ACDCF21E4048ABDCD040ACDCF51E4368ABDCD340336800EE166864278250752045406500803073FCAD1CF21E4068ABDCD040AD1CF51E4348ABDCD340334800EE1668AA18FB1EF265ABDCF51ED340ABDCF21ED0108300841085206001452024C07B033B1E00EE1668AA36FB1EF265ABDCF51ED340ABDCF21ED0108300841085206001452024C07B033B1E00EE1668853075F0AD5CD540600124C0600124C000EE805075FCAD5CD0403000D540300000EE16687501350600EE1668670027A4277282C0600CE0A127BA6003E0A127C68060867481808894AA68F21ED010AA68FC1ED68000EE600AE09E17904A0000EE60024A0124C06A0269FC381A00EE6A0069FE00EE4A02179E482E179A00EE6A0100EE6A0069FE00EE4A0200EE600449FE60028900482E690049046A0000EE60004C0060208C00670400EE60404C4060608C00460000EE67FC00EE6001F075600224C024C6600424C024C6600824C0601E24C600E000FD00000000000000000000000000000000000000000000000000000000000000002A04260422041E041A0416082EFE16081A041E04220426042A102AFD220322FF220826102EFE26042A042AFF2A062AFF2A06260A26062EFE260422041E031EFD1A0416081AFF32FE2A062A1C260426FC1E042EFE1A0516042EFE260826FF26FF1A04160816FD2E0E16082EFE16042EFE16032EFE160416FD2EFE26082E062A04260422041E041A04160432FF32FF32FF32FF2E081E04220426042A0432FE2E042EFD2A0416032A1C260426FB32FE2A04260422041E041A0416041AFF22FF2AFF26041E0432FE160332FE1E0332FE160316FD32FE1E0332FE16032EFF2EFF2EFF2E082A0416062E042A04260422041E041A04160816FA2E042EFD22031E042E02260216031A02260526FF2E061A031E032206260426FD160632FE32FF2E061A0316031E02220226061A041E061EFD32FE2604160322031A051AFF160316FD2E061E021A02160432FE1E041EFD2E082EFF2A0616041A0116011A0116011A0116011A0116011A0116011A0116011A0116011A0116011A0116011A0116011A0116011A0116041A041AFD160432FE32FF2E052A02260322021E031A0216031A021EFF2E062202160816FD2E0616032E0616032E0616032E06160316FF16022E0616031EFE1A051E04220326022A012E052EFF2A042E042EFF22042E052AFF2E062EFF2E052EFF2E052EFF2A0432FE2E032EFD2EFF1A041EFE1A042E222EF90000FE00000000000000682720641D406015605C0F805811A0540FC05015E04C1D404827204827004827204C1D405015E0540FC05811A05C0F80601560641D40682720682700000A08060408020A080006080A00020804020A080011000A780EDDDBBFFFFFEE7AE0A550A55000000000000000000000000000000011000A780EDDDBBFFFFFEE39F052A852A8000000000000000000000000000088005000701EDBBBFFFD77FF075E0AA50AA5000000000000000000000000000088005000701EDBBBFFFD77FF0F9C154A154A0000000000000000000000000000F000F050E0B0E0B0F02080F0F09090F0008000C000E000F0FFF8FFFCFFFEFFFFFFFEFFFCFFF800F000E000C000800000F080B0A0B0A08080F00010A030A00000F00020A0A0A00000F010D0B0B0D01010203070F00000000000000000001F0021003100C1032D7C8D8201FFFF7FFF00000000000019C02620401080088108408820442042404280828002400C207010800F000000000001E002101C10200840088388844488024002400280028004430824901860000000F001080E043002400141014202420422041102108110010802046403980618092410C220014001400240024011222111C110021004083808400780000001F0020802887608F20859F0544053C070600050004800A401200A10040800100000000003E0041005100C1004103BE078802FC028A028903B90028002E0062001F0020802887608F20859F2544453F870400040004000A001100A080404000804000A00112020A049202240158019804240FC20501FA811141008100030000000000400020279058508851087E0A51085087904120204041F8018801F8008001000202010500880050002000200020E1FCA222A4F9A104F106E114010400F80001001F8011801F820204048209E10A108A507E108A110A1A09E40400020000014000E2014502D8855242482024401A8019002408438F80008000800080018000F8010401140106E104F0F9A022A07CA0A0E12001200050008801050202010000F8010401140106E104F0F9A022A07CA060E060003000200020006000A00070001F0020802887608F20859F0544053E070500048004800A001100A080404000801F0020802887608F20859F0544053E07060006000C0004000400060005000E03C006B00D540AAA8D555AAA8D5406B003C000000000000000000000000000000000007C01830200840044C649EF296B28C6280028002438444442008183007C0000007C01830200840C441E481A28CC29E029A1A8C22404440842088183007C0000007C01830200846044F048D128622802286228F124D0446042008183007C0000007C01830208840844C449A229E1A8C028182834243C441842008183007C0000007C01830200844444384800280028C629AD29EF24C6440042008183007C0000007C0183022084204446488B2B0F2806283028582478443042008183007C0000007C01830200840C4416491E288C2880288C2916241E440C42008183007C0000007C01830200843044784858283028062B0F288B2446442042208183007C0"; var _local3 = _local2[name]; if (_local3 == undefined) { _local3 = _local2.c8pic; } loadData(_local3); } function loadData(romData) { romSize = romData.length; var _local2 = 0; while (_local2 < romSize) { var _local4 = romData.charAt(_local2); var _local3 = romData.charAt(_local2 + 1); memory[PC + (_local2 / 2)] = parseInt(_local4 + _local3, 16); _local2 = _local2 + 2; } var _local6 = parseInt("0F00", 16); _local2 = romSize; while (_local2 < _local6) { memory[PC + _local2] = 0; _local2++; } loadFonts(); } function readWord() { var _local2 = ""; var _local3 = memory[PC] << 8; _local3 = _local3 + memory[PC + 1]; _local2 = _local3.toString(16); while (_local2.length < 4) { _local2 = "0" + _local2; } return(_local2); } function pcStep(n) { PC = PC + n; } function pcGoto(offset) { PC = offset; pcStep(-2); } function iSet(val) { I = val; } function loadFonts() { var _local4 = parseInt("F00", 16); var _local3 = "F0909090F0"; _local3 = _local3 + "2060202070"; _local3 = _local3 + "F010F080F0"; _local3 = _local3 + "F010F010F0"; _local3 = _local3 + "9090F01010"; _local3 = _local3 + "F080F010F0"; _local3 = _local3 + "F080F090F0"; _local3 = _local3 + "F010204040"; _local3 = _local3 + "F090F090F0"; _local3 = _local3 + "F090F010F0"; _local3 = _local3 + "F090F09090"; _local3 = _local3 + "E090E090E0"; _local3 = _local3 + "F0808080F0"; _local3 = _local3 + "E0909090E0"; _local3 = _local3 + "F080F080F0"; _local3 = _local3 + "F080F08080"; var _local5 = "F0F0909090909090F0F020206060202020207070F0F01010F0F08080F0F0F0F01010F0F01010F0F090909090F0F010101010F0F08080F0F01010F0F0F0F08080F0F09090F0F0F0F01010202040404040F0F09090F0F09090F0F0F0F09090F0F01010F0F0F0F09090F0F090909090E0E09090E0E09090E0E0F0F0808080808080F0F0E0E0909090909090E0E0F0F08080F0F08080F0F0F0F08080F0F080808080"; var _local2 = 0; while (_local2 < _local3.length) { memory[_local4 + (_local2 / 2)] = parseInt(_local3.charAt(_local2) + _local3.charAt(_local2 + 1), 16); _local2 = _local2 + 2; } } function process(opcode) { switch (opcode.charAt(0).toUpperCase()) { case "0" : doSpecial(opcode); break; case "1" : var _local3 = opcode.substr(1, 3); trace_debug((opcode + ": goto ") + _local3); pcGoto(parseInt(_local3, 16)); break; case "2" : _local3 = opcode.substr(1, 3); trace_debug((opcode + ": gosub ") + _local3); S.push(PC); pcGoto(parseInt(_local3, 16)); break; case "3" : var _local8 = parseInt(opcode.charAt(1), 16); var _local6 = parseInt(opcode.substr(2, 2), 16); var _local5 = V[_local8] == _local6; (_local5 ? (pcStep(2)) : null); trace_debug((((((opcode + ": V[") + _local8) + "] == ") + _local6) + "? ") + _local5); break; case "4" : _local8 = parseInt(opcode.charAt(1), 16); _local6 = parseInt(opcode.substr(2, 2), 16); _local5 = V[_local8] != _local6; (_local5 ? (pcStep(2)) : null); trace_debug((((((opcode + ": V[") + _local8) + "] != ") + _local6) + "? ") + _local5); break; case "5" : _local8 = parseInt(opcode.charAt(1), 16); var _local7 = parseInt(opcode.charAt(2), 16); _local5 = V[_local8] == V[_local7]; (_local5 ? (pcStep(2)) : null); trace_debug((((((opcode + ": V[") + _local8) + "] == V[") + _local7) + "]? ") + _local5); break; case "6" : _local8 = parseInt(opcode.charAt(1), 16); _local6 = parseInt(opcode.substr(2, 2), 16); V[_local8] = _local6; trace_debug((((opcode + ": V[") + _local8) + "] = ") + _local6); break; case "7" : _local8 = parseInt(opcode.charAt(1), 16); _local6 = parseInt(opcode.substr(2, 2), 16); V[_local8] = binaryAdd(V[_local8], _local6); trace_debug((((((((opcode + ": V[") + _local8) + "] = V[") + _local8) + "] + ") + _local6) + " = ") + V[_local8].toString(16)); break; case "8" : doMath(opcode); break; case "9" : _local8 = parseInt(opcode.charAt(1), 16); _local7 = parseInt(opcode.charAt(2), 16); _local5 = V[_local8] != V[_local7]; (_local5 ? (pcStep(2)) : null); trace_debug((((((opcode + ": V[") + _local8) + "] != V[") + _local7) + "]? ") + _local5); break; case "A" : _local3 = opcode.substr(1, 3); iSet(parseInt(_local3, 16)); trace_debug((opcode + ": set data I=") + I.toString(16)); break; case "B" : var _local4 = opcode.substr(1, 3); _local3 = parseInt(_local4, 16); trace_debug((((opcode + ": goto V0+") + _local4) + " = ") + (V[0] + _local3).toString(16)); pcGoto(V[0] & _local3); break; case "C" : _local8 = parseInt(opcode.charAt(1), 16); _local6 = opcode.substr(2, 2); var _local10 = Math.floor(Math.random() * 256); var _local9 = parseInt(String(_local6), 16); V[_local8] = _local10 & _local9; trace_debug((((opcode + ": V[") + _local8) + "] = rand + ") + _local6); break; case "D" : drawSprite(opcode); break; case "E" : checkKeys(opcode); break; case "F" : doEffect(opcode); break; default : trace_debug(opcode + ": unrecognized opcode"); } } function checkKeys(opcode) { var _local2 = V[parseInt(opcode.charAt(1), 16)]; var _local5 = opcode.substr(2, 2); switch (_local5.toUpperCase()) { case "9E" : var _local4 = Key.isDown(keyMap[_local2]); trace_debug((((opcode + ": Key[") + String.fromCharCode(keyMap[_local2])) + "] down? ") + _local4); (_local4 ? (pcStep(2)) : null); break; case "A1" : _local4 = !Key.isDown(keyMap[_local2]); trace_debug((((opcode + ": Key[") + String.fromCharCode(keyMap[_local2])) + "] up? ") + _local4); (_local4 ? (pcStep(2)) : null); break; default : trace_debug(opcode + ": unrecognized opcode"); } } function drawSprite(opcode) { var _local6 = V[parseInt(opcode.charAt(1), 16)]; var _local5 = V[parseInt(opcode.charAt(2), 16)]; var _local7 = parseInt(opcode.charAt(3), 16); var _local8; _local6 = _local6 % (schip8 ? 128 : 64); _local5 = _local5 % (schip8 ? 64 : 32); _local8 = 8; if (_local7 == 0) { _local7 = 16; _local8 = _local8 + (schip8 ? 16 : 0); trace_debug(((((((opcode + ": draw ") + _local8) + "x16 sprite at (") + _local6) + ",") + _local5) + ")"); } else { trace_debug(((((((opcode + ": draw 8x") + _local7) + " sprite at (") + _local6) + ",") + _local5) + ")"); } var _local2 = 0; while (_local2 < _local7) { V[15] = 0; var _local3; _local3 = video.drawSpriteByte(memory[I + _local2], _local6, _local5 + _local2, schip8); if (_local8 > 8) { var _local4; _local4 = video.drawSpriteByte(memory[(I + _local2) + 1], _local6 + 8, _local5 + _local2, schip8); _local3 = _local3 || (_local4); } V[15] = (_local3 ? 1 : 0); _local2++; } } function doMath(opcode) { var _local2 = parseInt(opcode.charAt(1), 16); var _local3 = parseInt(opcode.charAt(2), 16); switch (opcode.charAt(3).toUpperCase()) { case "0" : trace_debug((((((opcode + ": V[") + _local2) + "] = V[") + _local3) + "] = ") + V[_local3]); V[_local2] = V[_local3]; break; case "1" : V[_local2] = V[_local2] & V[_local3]; trace_debug((((((opcode + ": V[") + _local2) + "] AND V[") + _local3) + "] = ") + V[_local2]); break; case "2" : V[_local2] = V[_local2] | V[_local3]; trace_debug((((((opcode + ": V[") + _local2) + "] OR V[") + _local3) + "] = ") + V[_local2]); break; case "3" : V[_local2] = V[_local2] ^ V[_local3]; trace_debug((((((opcode + ": V[") + _local2) + "] XOR V[") + _local3) + "] = ") + V[_local2]); break; case "4" : V[_local2] = binaryAdd(V[_local2], V[_local3]); trace_debug((((((opcode + ": V[") + _local2) + "] + V[") + _local3) + "] = ") + V[_local2]); break; case "5" : V[_local2] = binarySub(V[_local2], V[_local3]); trace_debug((((((opcode + ": V[") + _local2) + "] - V[") + _local3) + "] = ") + V[_local2]); break; case "6" : V[_local2] = binaryShr(V[_local2]); trace_debug((((opcode + ": V[") + _local2) + "] >> = ") + V[_local2]); break; case "7" : V[_local2] = binarySub(V[_local3], V[_local2]); trace_debug((((((opcode + ": V[") + _local3) + "] - V[") + _local2) + "] = ") + V[_local3]); break; case "E" : V[_local2] = binaryShl(V[_local2]); trace_debug((((opcode + ": V[") + _local2) + "] << = ") + V[_local2]); } } function doEffect(opcode) { var _local6 = parseInt(opcode.charAt(1), 16); var _local12 = opcode.substr(2, 2); switch (_local12.toUpperCase()) { case "07" : trace_debug((((opcode + ": set V[") + _local6) + "] to delay = ") + delay); V[_local6] = delay; break; case "0A" : trace_debug(((opcode + ": wait for key input, store in V[") + _local6) + "]"); waitReg = _local6; _global.state = _global.WAITKEY; break; case "15" : trace_debug((((opcode + ": set delay to V[") + _local6) + "] = ") + V[_local6]); delay = V[_local6]; break; case "18" : trace_debug((((opcode + ": set sound to V[") + _local6) + "] = ") + V[_local6]); sound = V[_local6]; break; case "1E" : I = checkOverflow(I + V[_local6], 12, false); trace_debug((((opcode + ": I = I + V[") + _local6) + "] = ") + I.toString(16)); break; case "29" : var _local7 = parseInt("F00", 16); iSet(_local7); var _local13 = 5; var _local11 = V[_local6] * _local13; iSet(_local7 + _local11); trace_debug((((((opcode + ": set I to ") + I.toString(16)) + ": font char V[") + _local6) + "]=") + V[_local6]); break; case "33" : var _local8 = int(V[_local6] / 100); var _local10 = int((V[_local6] % 100) / 10); var _local9 = int(V[_local6] % 10); trace_debug((((((opcode + ": BCD storage of V[") + _local6) + "] = ") + V[_local6].toString(16)) + " at ") + I.toString(16)); memory[I] = _local8; memory[I + 1] = _local10; memory[I + 2] = _local9; break; case "55" : _local6 = parseInt(opcode.charAt(1), 16); trace_debug(((((opcode + ": store V[0]...V[") + _local6) + "] at M(") + I.toString(16)) + ")"); var _local3 = 0; while (_local3 <= _local6) { memory[I++] = V[_local3]; _local3++; } break; case "65" : _local6 = parseInt(opcode.charAt(1), 16); trace_debug(((((opcode + ": load V[0]...V[") + _local6) + "] from M(") + I.toString(16)) + ")"); _local3 = 0; while (_local3 <= _local6) { V[_local3] = memory[I++]; _local3++; } break; case "75" : trace_debug(opcode + ": save V[0]...V[15] to local storage."); var _local5 = SharedObject.getLocal("flip8"); if (_local5.flush(1)) { _local5.register = new Array(16); _local3 = 0; while (_local3 < 16) { _local5.register[_local3] = V[_local3]; _local3++; } } break; case "85" : trace_debug(opcode + ": load V[0]...V[15] from local storage."); _local5 = SharedObject.getLocal("flip8"); if (_local5.flush(1)) { _local3 = 0; while (_local3 < 16) { V[_local3] = _local5.register[_local3]; _local3++; } } break; default : trace_debug(opcode + ": unrecognized opcode"); } } function doSpecial(opcode) { switch (opcode.charAt(2).toUpperCase()) { case "0" : trace_debug(opcode + ": no operation"); break; case "C" : var _local4 = opcode.charAt(3); _local4 = Number(opcode.charAt(3)); trace_debug(((opcode + ": [schip8] scroll down by ") + _local4) + " lines."); video.scrollDown(_local4); break; case "F" : doSchip8(opcode); break; case "E" : switch (opcode.charAt(3).toUpperCase()) { case "0" : trace_debug(opcode + ": clear screen"); video.clearScreen(); video.clear(); break; case "E" : var _local3 = S.pop(); trace_debug((opcode + ": return to ") + _local3.toString(16)); pcGoto(Number(_local3)); pcStep(2); break; default : trace_debug(opcode + ": unrecognized opcode"); } break; default : trace_debug(opcode + ": unrecognized opcode"); } } function doSchip8(opcode) { switch (opcode.charAt(3).toUpperCase()) { case "B" : trace_debug(opcode + ": [schip8] scroll 4 pixels to the right"); video.scrollRight(schip8); break; case "C" : trace_debug(opcode + ": [schip8] scroll 4 pixels to the left"); video.scrollLeft(schip8); break; case "D" : trace_debug(opcode + ": EMULATOR QUIT (emulated as stop)"); _global.state = _global.STOP; break; case "E" : trace_debug(opcode + ": set CHIP8 mode"); setSchip8Mode(false); break; case "F" : trace_debug(opcode + ": [schip8] set SCHIP8 mode"); setSchip8Mode(true); break; default : trace_debug(opcode + ": unrecognized opcode"); } } function setSchip8Mode(bln) { schip8 = bln; if (schip8) { path._xscale = 100; path._yscale = 100; } else { path._xscale = c8zoom; path._yscale = c8zoom; } } function checkOverflow(n, size, setCarry) { var _local3; if ((n > 2) ^ (size - 1)) { var _local2 = n.toString(2); if (setCarry) { var _local5 = _local2.length - size; var _local6 = _local2.substr(0, _local5); V[15] = parseInt(_local6, 2); } var _local8 = _local2.substr(-size, size); _local3 = parseInt(_local8, 2); } else { _local3 = n; } return(_local3); } function nibble(n) { var _local1 = n.toString(2); while (_local1.length < 4) { _local1 = "0" + _local1; } return(_local1); } function byte(n) { var _local1 = n.toString(2); while (_local1.length < 8) { _local1 = "0" + _local1; } return(_local1); } function binaryShr(x) { var _local3 = ""; var _local2 = byte(x); V[15] = Number(_local2.charAt(4)); return(x >> 1); } function binaryShl(x) { var _local2 = byte(x); V[15] = Number(_local2.charAt(0)); return(x << 1); } function binaryAdd(x, y) { var _local2 = x + y; _local2 = checkOverflow(_local2, 8, true); return(_local2); } function binaryAddNC(x, y) { var _local2 = x + y; _local2 = checkOverflow(_local2, 8, false); return(_local2); } function binarySub(x, y) { var _local2 = x - y; if (_local2 < 0) { V[15] = 0; _local2 = Math.abs(_local2); } else { V[15] = 1; } return(_local2); } var c8zoom = 200; var copyright = " AS 2.0 SCHIP8 emulator by Newsdee (http://www.newsdee.com)"; var thanks1 = "based on David Winter's CHIP8 documentation (http://www.pdc.kth.se/~lfo/chip8/CHIP8.htm)"; var thanks2 = "also based on Rob Ware's CHIP8 documentation (http://www.goldroad.co.uk/chip8.html)"; }
Symbol 313 MovieClip [__Packages.Screen] Frame 0
class Screen extends MovieClip { var screenBytes, pixArray; function Screen () { super(); screenBytes = new Array(1024); pixArray = new Array(1024); } function create(parent) { var _local7 = 16; var _local4 = 0; var _local3 = 0; var _local5; var _local9; var _local2 = 0; while (_local2 < 1024) { _local4 = Math.floor(_local2 % 16); _local3 = Math.floor(_local2 / 16); var _local6 = (("pix_" + _local4) + "_") + _local3; _local5 = parent.attachMovie("pixelLine", _local6, _local7++); _local4 = _local4 * 16; _local3 = _local3 * 2; _local5._x = _local4; _local5._y = _local3; pixArray[_local2] = _local5; _local2++; } } function drawSpriteByte(val, x, y, schip8) { var _local3 = false; var _local4 = 0; _local4 = (y * 128) + x; var _local2 = Math.floor(_local4 / 8); var _local5 = _local2 + 1; if (schip8) { if ((_local2 % 16) == 15) { _local5 = _local2 - 15; } } else if ((_local2 % 8) == 7) { _local5 = _local2 - 7; } var _local6 = Math.floor(_local4 % 8); var _local12 = 0; var _local11 = 0; if (_local6 == 0) { _local3 = setByteCollide(_local2, val); } else { var _local9; var _local10 = val >> _local6; var _local8 = (val << (8 - _local6)) & 255; _local3 = setByteCollide(_local2, _local10); _local9 = setByteCollide(_local5, _local8); _local3 = _local3 || (_local9); } return(_local3); } function clearScreen() { var _local2 = 0; while (_local2 < 1024) { setScreenByte(_local2, 0); _local2++; } } function setScreenByte(offset, val) { var _local3 = pixArray[offset]; var _local2 = (val & 240) >> 4; _local3.highBits.gotoAndStop(_local2 + 1); _local2 = val & 15; _local3.lowBits.gotoAndStop(_local2 + 1); } function setByteCollide(offset, val) { var _local5 = false; var _local2 = getScreenByte(offset); var _local3 = _local2 ^ val; setScreenByte(offset, _local3); return(_local3 != (_local2 | val)); } function getScreenByte(offset) { var _local3 = pixArray[offset]; var _local2 = 0; _local2 = (_local3.highBits._currentframe - 1) << 4; _local2 = _local2 + (_local3.lowBits._currentframe - 1); _local2 = _local2 & 255; return(_local2); } function scrollLeft(schip8) { var _local7 = 0; while (_local7 < 64) { var _local2 = 0; while (_local2 < 16) { var _local3 = (_local7 * 64) + _local2; var _local6 = getScreenByte(_local3); var _local5 = 0; var _local4 = (_local6 << 4) & 240; if (_local2 < (schip8 ? 16 : 8)) { _local5 = getScreenByte(_local3 + 1); _local4 = _local4 + (_local5 >> 4); } setScreenByte(_local3, _local4); _local2++; } _local7++; } } function scrollRight(schip8) { var _local7 = 0; while (_local7 < 64) { var _local2 = 0; while (_local2 < 16) { var _local3 = (_local7 * 64) + _local2; var _local5 = getScreenByte(_local3); var _local6 = 0; var _local4 = _local5 >> 4; if (_local2 > 1) { _local6 = getScreenByte(_local3 - 1); _local4 = _local4 + ((_local5 << 4) & 240); } setScreenByte(_local3, _local4); _local2++; } _local7++; } } function scrollDown(lines) { var _local3 = lines * 16; var _local2 = 1024; while (_local2 > _local3) { setScreenByte(_local2, getScreenByte(_local2 - _local3)); _local2--; } _local2 = _local3; while (_local2 >= 0) { setScreenByte(_local2, 0); _local2--; } } function byte(n) { var _local1 = n.toString(2); while (_local1.length < 8) { _local1 = "0" + _local1; } return(_local1); } function nibble(n) { var _local1 = n.toString(2); while (_local1.length < 4) { _local1 = "0" + _local1; } return(_local1); } function drawPixelSuper(x, y, schip8) { var _local5 = (y * 128) + x; var _local6 = Math.floor(_local5 / 8); var _local3 = pixArray[_local6]; var _local7 = nibble(_local3.highBits._currentframe - 1); _local7 = _local7 + nibble(_local3.lowBits._currentframe - 1); var _local10 = parseInt(_local7, 2); var _local8 = Math.floor(_local5 % 8); var _local2 = Math.pow(2, 7 - _local8); _local2 = _local2 ^ _local10; setScreenByte(_local6, _local2); var _local4; var _local9 = _local2.charAt(_local8); if (_local9 == "0") { _local4 = true; } else { _local4 = false; } return(_local4); } }

Library Items

Symbol 1 GraphicUsed by:7 28 66
Symbol 2 GraphicUsed by:7
Symbol 3 GraphicUsed by:7
Symbol 4 GraphicUsed by:7
Symbol 5 GraphicUsed by:7
Symbol 6 GraphicUsed by:7
Symbol 7 MovieClipUses:1 2 3 4 5 6Used by:8
Symbol 8 MovieClip [pixelLine]Uses:7
Symbol 9 GraphicUsed by:10 11 12 13
Symbol 10 Button [pixel]Uses:9Used by:262
Symbol 11 Button [pixel]Uses:9Used by:262
Symbol 12 Button [pixel]Uses:9Used by:262
Symbol 13 MovieClip [pixel]Uses:9Used by:262
Symbol 14 FontUsed by:15
Symbol 15 EditableTextUses:14Used by:16
Symbol 16 MovieClip [test]Uses:15Used by:Timeline
Symbol 17 GraphicUsed by:Timeline
Symbol 18 FontUsed by:19
Symbol 19 TextUses:18Used by:Timeline
Symbol 20 FontUsed by:21 22 27 29 32 65 165 166 167 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 225 305 306
Symbol 21 EditableTextUses:20Used by:Timeline
Symbol 22 EditableTextUses:20Used by:26
Symbol 23 GraphicUsed by:26 31 34
Symbol 24 FontUsed by:25 30 33
Symbol 25 EditableTextUses:24Used by:26
Symbol 26 ButtonUses:22 23 25Used by:Timeline
Symbol 27 EditableTextUses:20Used by:28
Symbol 28 ButtonUses:27 1Used by:Timeline
Symbol 29 EditableTextUses:20Used by:31
Symbol 30 EditableTextUses:24Used by:31
Symbol 31 ButtonUses:29 23 30Used by:Timeline
Symbol 32 EditableTextUses:20Used by:34
Symbol 33 EditableTextUses:24Used by:34
Symbol 34 ButtonUses:32 23 33Used by:Timeline
Symbol 35 FontUsed by:36 37 72 73 83 84 85 86 87 88 90 92 94 96 98 100 102 104 106 108 110 112 114 116 118 120 122 124 126 127 129 130 133 136 138 140 142 144 146 148 150 152 153 155 156 158 183 227 228 229 230 231 232 233 234 235 236 237 239 241 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304
Symbol 36 TextUses:35Used by:Timeline
Symbol 37 TextUses:35Used by:Timeline
Symbol 38 GraphicUsed by:39 75
Symbol 39 MovieClipUses:38Used by:57
Symbol 40 FontUsed by:41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 64 76 131 157
Symbol 41 TextUses:40Used by:57
Symbol 42 TextUses:40Used by:57
Symbol 43 TextUses:40Used by:57
Symbol 44 TextUses:40Used by:57
Symbol 45 TextUses:40Used by:57
Symbol 46 TextUses:40Used by:57
Symbol 47 TextUses:40Used by:57
Symbol 48 TextUses:40Used by:57
Symbol 49 TextUses:40Used by:57
Symbol 50 TextUses:40Used by:57
Symbol 51 TextUses:40Used by:57
Symbol 52 TextUses:40Used by:57
Symbol 53 TextUses:40Used by:57
Symbol 54 TextUses:40Used by:57
Symbol 55 TextUses:40Used by:57
Symbol 56 TextUses:40Used by:57
Symbol 57 MovieClipUses:39 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56Used by:Timeline
Symbol 58 FontUsed by:59
Symbol 59 EditableTextUses:58Used by:63
Symbol 60 GraphicUsed by:61 180 182
Symbol 61 MovieClipUses:60Used by:63
Symbol 62 MovieClipUsed by:63
Symbol 63 MovieClipUses:59 61 62Used by:Timeline
Symbol 64 TextUses:40Used by:Timeline
Symbol 65 EditableTextUses:20Used by:66
Symbol 66 ButtonUses:65 1Used by:Timeline
Symbol 67 FontUsed by:68
Symbol 68 EditableTextUses:67Used by:74
Symbol 69 GraphicUsed by:71 77 78 79 80 81 82 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 128 135 137 139 141 143 145 147 149 151 154
Symbol 70 GraphicUsed by:71 77 78 79 80 81 82 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 128 135 137 139 141 143 145 147 149 151 154
Symbol 71 ButtonUses:69 70Used by:74
Symbol 72 TextUses:35Used by:74
Symbol 73 TextUses:35Used by:74
Symbol 74 MovieClipUses:68 71 72 73Used by:Timeline
Symbol 75 ButtonUses:38Used by:Timeline
Symbol 76 TextUses:40Used by:Timeline
Symbol 77 ButtonUses:69 70Used by:161
Symbol 78 ButtonUses:69 70Used by:161
Symbol 79 ButtonUses:69 70Used by:161
Symbol 80 ButtonUses:69 70Used by:161
Symbol 81 ButtonUses:69 70Used by:161
Symbol 82 ButtonUses:69 70Used by:161
Symbol 83 TextUses:35Used by:161
Symbol 84 TextUses:35Used by:161
Symbol 85 TextUses:35Used by:161
Symbol 86 TextUses:35Used by:161
Symbol 87 TextUses:35Used by:161
Symbol 88 TextUses:35Used by:161
Symbol 89 ButtonUses:69 70Used by:161
Symbol 90 TextUses:35Used by:161
Symbol 91 ButtonUses:69 70Used by:161
Symbol 92 TextUses:35Used by:161
Symbol 93 ButtonUses:69 70Used by:161
Symbol 94 TextUses:35Used by:161
Symbol 95 ButtonUses:69 70Used by:161
Symbol 96 TextUses:35Used by:161
Symbol 97 ButtonUses:69 70Used by:161
Symbol 98 TextUses:35Used by:161
Symbol 99 ButtonUses:69 70Used by:161
Symbol 100 TextUses:35Used by:161
Symbol 101 ButtonUses:69 70Used by:161
Symbol 102 TextUses:35Used by:161
Symbol 103 ButtonUses:69 70Used by:161
Symbol 104 TextUses:35Used by:161
Symbol 105 ButtonUses:69 70Used by:161
Symbol 106 TextUses:35Used by:161
Symbol 107 ButtonUses:69 70Used by:161
Symbol 108 TextUses:35Used by:161
Symbol 109 ButtonUses:69 70Used by:161
Symbol 110 TextUses:35Used by:161
Symbol 111 ButtonUses:69 70Used by:161
Symbol 112 TextUses:35Used by:161
Symbol 113 ButtonUses:69 70Used by:161
Symbol 114 TextUses:35Used by:161
Symbol 115 ButtonUses:69 70Used by:161
Symbol 116 TextUses:35Used by:161
Symbol 117 ButtonUses:69 70Used by:161
Symbol 118 TextUses:35Used by:161
Symbol 119 ButtonUses:69 70Used by:161
Symbol 120 TextUses:35Used by:161
Symbol 121 ButtonUses:69 70Used by:161
Symbol 122 TextUses:35Used by:161
Symbol 123 ButtonUses:69 70Used by:161
Symbol 124 TextUses:35Used by:161
Symbol 125 ButtonUses:69 70Used by:161
Symbol 126 TextUses:35Used by:161
Symbol 127 TextUses:35Used by:161
Symbol 128 ButtonUses:69 70Used by:161
Symbol 129 TextUses:35Used by:161
Symbol 130 TextUses:35Used by:134
Symbol 131 TextUses:40Used by:134
Symbol 132 GraphicUsed by:134 159 238 240 242
Symbol 133 TextUses:35Used by:134
Symbol 134 ButtonUses:130 131 132 133Used by:161
Symbol 135 ButtonUses:69 70Used by:160
Symbol 136 TextUses:35Used by:160
Symbol 137 ButtonUses:69 70Used by:160
Symbol 138 TextUses:35Used by:160
Symbol 139 ButtonUses:69 70Used by:160
Symbol 140 TextUses:35Used by:160
Symbol 141 ButtonUses:69 70Used by:160
Symbol 142 TextUses:35Used by:160
Symbol 143 ButtonUses:69 70Used by:160
Symbol 144 TextUses:35Used by:160
Symbol 145 ButtonUses:69 70Used by:160
Symbol 146 TextUses:35Used by:160
Symbol 147 ButtonUses:69 70Used by:160
Symbol 148 TextUses:35Used by:160
Symbol 149 ButtonUses:69 70Used by:160
Symbol 150 TextUses:35Used by:160
Symbol 151 ButtonUses:69 70Used by:160
Symbol 152 TextUses:35Used by:160
Symbol 153 TextUses:35Used by:160
Symbol 154 ButtonUses:69 70Used by:160
Symbol 155 TextUses:35Used by:160
Symbol 156 TextUses:35Used by:159
Symbol 157 TextUses:40Used by:159
Symbol 158 TextUses:35Used by:159
Symbol 159 ButtonUses:156 157 132 158Used by:160
Symbol 160 MovieClipUses:135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 159Used by:161
Symbol 161 MovieClipUses:77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 134 160Used by:Timeline
Symbol 162 GraphicUsed by:Timeline
Symbol 163 GraphicUsed by:Timeline
Symbol 164 GraphicUsed by:307
Symbol 165 TextUses:20Used by:307
Symbol 166 EditableTextUses:20Used by:223
Symbol 167 EditableTextUses:20Used by:223
Symbol 168 GraphicUsed by:177
Symbol 169 BitmapUsed by:170
Symbol 170 GraphicUses:169Used by:177
Symbol 171 BitmapUsed by:172
Symbol 172 GraphicUses:171Used by:177
Symbol 173 BitmapUsed by:174
Symbol 174 GraphicUses:173Used by:177
Symbol 175 BitmapUsed by:176
Symbol 176 GraphicUses:175Used by:177
Symbol 177 MovieClipUses:168 170 172 174 176Used by:223
Symbol 178 FontUsed by:179 181
Symbol 179 TextUses:178Used by:180 182
Symbol 180 ButtonUses:179 60Used by:223
Symbol 181 TextUses:178Used by:182
Symbol 182 ButtonUses:181 60 179Used by:223
Symbol 183 EditableTextUses:35Used by:184
Symbol 184 MovieClipUses:183Used by:223
Symbol 185 TextUses:20Used by:223
Symbol 186 TextUses:20Used by:223
Symbol 187 TextUses:20Used by:223
Symbol 188 TextUses:20Used by:223
Symbol 189 TextUses:20Used by:223
Symbol 190 TextUses:20Used by:223
Symbol 191 TextUses:20Used by:223
Symbol 192 TextUses:20Used by:223
Symbol 193 TextUses:20Used by:223
Symbol 194 TextUses:20Used by:223
Symbol 195 TextUses:20Used by:223
Symbol 196 TextUses:20Used by:223
Symbol 197 TextUses:20Used by:223
Symbol 198 TextUses:20Used by:223
Symbol 199 TextUses:20Used by:223
Symbol 200 TextUses:20Used by:223
Symbol 201 TextUses:20Used by:223
Symbol 202 TextUses:20Used by:223
Symbol 203 TextUses:20Used by:223
Symbol 204 TextUses:20Used by:223
Symbol 205 TextUses:20Used by:223
Symbol 206 TextUses:20Used by:223
Symbol 207 TextUses:20Used by:223
Symbol 208 TextUses:20Used by:223
Symbol 209 TextUses:20Used by:223
Symbol 210 TextUses:20Used by:223
Symbol 211 TextUses:20Used by:223
Symbol 212 TextUses:20Used by:223
Symbol 213 TextUses:20Used by:223
Symbol 214 TextUses:20Used by:223
Symbol 215 TextUses:20Used by:223
Symbol 216 TextUses:20Used by:223
Symbol 217 TextUses:20Used by:223
Symbol 218 TextUses:20Used by:223
Symbol 219 TextUses:20Used by:223
Symbol 220 TextUses:20Used by:223
Symbol 221 TextUses:20Used by:223
Symbol 222 TextUses:20Used by:223
Symbol 223 MovieClipUses:166 167 177 180 182 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222Used by:307
Symbol 224 GraphicUsed by:307
Symbol 225 TextUses:20Used by:307
Symbol 226 GraphicUsed by:262
Symbol 227 TextUses:35Used by:262
Symbol 228 EditableTextUses:35Used by:262
Symbol 229 EditableTextUses:35Used by:262
Symbol 230 EditableTextUses:35Used by:262
Symbol 231 TextUses:35Used by:262
Symbol 232 EditableTextUses:35Used by:262
Symbol 233 EditableTextUses:35Used by:262
Symbol 234 EditableTextUses:35Used by:262
Symbol 235 EditableTextUses:35Used by:262
Symbol 236 EditableTextUses:35Used by:262
Symbol 237 TextUses:35Used by:238
Symbol 238 ButtonUses:237 132Used by:262
Symbol 239 TextUses:35Used by:240
Symbol 240 ButtonUses:239 132Used by:262
Symbol 241 TextUses:35Used by:242
Symbol 242 ButtonUses:241 132Used by:262
Symbol 243 EditableTextUses:35Used by:262
Symbol 244 EditableTextUses:35Used by:262
Symbol 245 EditableTextUses:35Used by:262
Symbol 246 EditableTextUses:35Used by:262
Symbol 247 EditableTextUses:35Used by:262
Symbol 248 EditableTextUses:35Used by:262
Symbol 249 EditableTextUses:35Used by:262
Symbol 250 EditableTextUses:35Used by:262
Symbol 251 EditableTextUses:35Used by:262
Symbol 252 EditableTextUses:35Used by:262
Symbol 253 EditableTextUses:35Used by:262
Symbol 254 EditableTextUses:35Used by:262
Symbol 255 EditableTextUses:35Used by:262
Symbol 256 EditableTextUses:35Used by:262
Symbol 257 EditableTextUses:35Used by:262
Symbol 258 EditableTextUses:35Used by:262
Symbol 259 EditableTextUses:35Used by:262
Symbol 260 EditableTextUses:35Used by:262
Symbol 261 EditableTextUses:35Used by:262
Symbol 262 MovieClipUses:226 227 228 229 230 13 231 12 232 233 234 235 236 238 240 242 243 244 245 246 247 248 249 11 250 251 252 253 254 255 256 257 258 10 259 260 261Used by:307
Symbol 263 GraphicUsed by:307
Symbol 264 EditableTextUses:35Used by:307
Symbol 265 EditableTextUses:35Used by:307
Symbol 266 TextUses:35Used by:307
Symbol 267 TextUses:35Used by:307
Symbol 268 TextUses:35Used by:307
Symbol 269 EditableTextUses:35Used by:307
Symbol 270 EditableTextUses:35Used by:307
Symbol 271 EditableTextUses:35Used by:307
Symbol 272 TextUses:35Used by:307
Symbol 273 EditableTextUses:35Used by:307
Symbol 274 EditableTextUses:35Used by:307
Symbol 275 EditableTextUses:35Used by:307
Symbol 276 EditableTextUses:35Used by:307
Symbol 277 TextUses:35Used by:307
Symbol 278 TextUses:35Used by:307
Symbol 279 TextUses:35Used by:307
Symbol 280 TextUses:35Used by:307
Symbol 281 EditableTextUses:35Used by:307
Symbol 282 EditableTextUses:35Used by:307
Symbol 283 EditableTextUses:35Used by:307
Symbol 284 EditableTextUses:35Used by:307
Symbol 285 TextUses:35Used by:307
Symbol 286 TextUses:35Used by:307
Symbol 287 TextUses:35Used by:307
Symbol 288 TextUses:35Used by:307
Symbol 289 EditableTextUses:35Used by:307
Symbol 290 EditableTextUses:35Used by:307
Symbol 291 EditableTextUses:35Used by:307
Symbol 292 EditableTextUses:35Used by:307
Symbol 293 TextUses:35Used by:307
Symbol 294 TextUses:35Used by:307
Symbol 295 TextUses:35Used by:307
Symbol 296 TextUses:35Used by:307
Symbol 297 EditableTextUses:35Used by:307
Symbol 298 EditableTextUses:35Used by:307
Symbol 299 EditableTextUses:35Used by:307
Symbol 300 EditableTextUses:35Used by:307
Symbol 301 TextUses:35Used by:307
Symbol 302 TextUses:35Used by:307
Symbol 303 TextUses:35Used by:307
Symbol 304 TextUses:35Used by:307
Symbol 305 TextUses:20Used by:307
Symbol 306 TextUses:20Used by:307
Symbol 307 MovieClipUses:164 165 223 224 225 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306Used by:Timeline
Symbol 308 GraphicUsed by:311
Symbol 309 GraphicUsed by:311
Symbol 310 GraphicUsed by:311
Symbol 311 MovieClipUses:308 309 310Used by:Timeline
Symbol 312 MovieClip [__Packages.Chip8]
Symbol 313 MovieClip [__Packages.Screen]

Instance Names

"fps_txt"Frame 1Symbol 21 EditableText
"pause_btn"Frame 1Symbol 26 Button
"speed_btn"Frame 1Symbol 28 Button
"step_btn"Frame 1Symbol 31 Button
"reset_btn"Frame 1Symbol 34 Button
"debug_btn"Frame 1Symbol 66 Button
"infoPane_mc"Frame 1Symbol 307 MovieClip
"oldTvEffect"Frame 1Symbol 311 MovieClip
"highBits"Symbol 8 MovieClip [pixelLine] Frame 1Symbol 7 MovieClip
"lowBits"Symbol 8 MovieClip [pixelLine] Frame 1Symbol 7 MovieClip
"output"Symbol 16 MovieClip [test] Frame 1Symbol 15 EditableText
"fpsCount"Symbol 63 MovieClip Frame 1Symbol 59 EditableText
"toLoad_txt"Symbol 74 MovieClip Frame 1Symbol 68 EditableText
"pong"Symbol 74 MovieClip Frame 1Symbol 71 Button
"pong"Symbol 160 MovieClip Frame 1Symbol 135 Button
"pong"Symbol 160 MovieClip Frame 1Symbol 137 Button
"pong"Symbol 160 MovieClip Frame 1Symbol 139 Button
"pong"Symbol 160 MovieClip Frame 1Symbol 141 Button
"pong"Symbol 160 MovieClip Frame 1Symbol 143 Button
"pong"Symbol 160 MovieClip Frame 1Symbol 145 Button
"pong"Symbol 160 MovieClip Frame 1Symbol 147 Button
"pong"Symbol 160 MovieClip Frame 1Symbol 149 Button
"pong"Symbol 160 MovieClip Frame 1Symbol 151 Button
"pong"Symbol 160 MovieClip Frame 1Symbol 154 Button
"c8pic"Symbol 161 MovieClip Frame 1Symbol 77 Button
"pong"Symbol 161 MovieClip Frame 1Symbol 78 Button
"pong"Symbol 161 MovieClip Frame 1Symbol 79 Button
"c8pic"Symbol 161 MovieClip Frame 1Symbol 80 Button
"pong"Symbol 161 MovieClip Frame 1Symbol 81 Button
"pong"Symbol 161 MovieClip Frame 1Symbol 82 Button
"pong"Symbol 161 MovieClip Frame 1Symbol 89 Button
"pong"Symbol 161 MovieClip Frame 1Symbol 91 Button
"pong"Symbol 161 MovieClip Frame 1Symbol 93 Button
"pong"Symbol 161 MovieClip Frame 1Symbol 95 Button
"pong"Symbol 161 MovieClip Frame 1Symbol 97 Button
"pong"Symbol 161 MovieClip Frame 1Symbol 99 Button
"pong"Symbol 161 MovieClip Frame 1Symbol 101 Button
"pong"Symbol 161 MovieClip Frame 1Symbol 103 Button
"pong"Symbol 161 MovieClip Frame 1Symbol 105 Button
"pong"Symbol 161 MovieClip Frame 1Symbol 107 Button
"pong"Symbol 161 MovieClip Frame 1Symbol 109 Button
"pong"Symbol 161 MovieClip Frame 1Symbol 111 Button
"pong"Symbol 161 MovieClip Frame 1Symbol 113 Button
"pong"Symbol 161 MovieClip Frame 1Symbol 115 Button
"pong"Symbol 161 MovieClip Frame 1Symbol 117 Button
"pong"Symbol 161 MovieClip Frame 1Symbol 119 Button
"pong"Symbol 161 MovieClip Frame 1Symbol 121 Button
"pong"Symbol 161 MovieClip Frame 1Symbol 123 Button
"pong"Symbol 161 MovieClip Frame 1Symbol 125 Button
"pong"Symbol 161 MovieClip Frame 1Symbol 97 Button
"pong"Symbol 161 MovieClip Frame 1Symbol 97 Button
"pong"Symbol 161 MovieClip Frame 1Symbol 128 Button
"pageCounter"Symbol 184 MovieClip Frame 1Symbol 183 EditableText
"images"Symbol 223 MovieClip Frame 1Symbol 177 MovieClip
"red_input"Symbol 262 MovieClip Frame 1Symbol 228 EditableText
"green_input"Symbol 262 MovieClip Frame 1Symbol 229 EditableText
"blue_input"Symbol 262 MovieClip Frame 1Symbol 230 EditableText
"redPix"Symbol 262 MovieClip Frame 1Symbol 13 MovieClip [pixel]
"greenPix"Symbol 262 MovieClip Frame 1Symbol 13 MovieClip [pixel]
"bluePix"Symbol 262 MovieClip Frame 1Symbol 13 MovieClip [pixel]
"finalPix"Symbol 262 MovieClip Frame 1Symbol 12 Button [pixel]
"redH_txt"Symbol 262 MovieClip Frame 1Symbol 232 EditableText
"greenH_txt"Symbol 262 MovieClip Frame 1Symbol 233 EditableText
"blueH_txt"Symbol 262 MovieClip Frame 1Symbol 234 EditableText
"redB_txt"Symbol 262 MovieClip Frame 1Symbol 235 EditableText
"blueB_txt"Symbol 262 MovieClip Frame 1Symbol 236 EditableText
"greenB_txt"Symbol 262 MovieClip Frame 1Symbol 243 EditableText
"red_input"Symbol 262 MovieClip Frame 2Symbol 244 EditableText
"green_input"Symbol 262 MovieClip Frame 2Symbol 245 EditableText
"blue_input"Symbol 262 MovieClip Frame 2Symbol 246 EditableText
"redH_txt"Symbol 262 MovieClip Frame 2Symbol 247 EditableText
"greenH_txt"Symbol 262 MovieClip Frame 2Symbol 248 EditableText
"blueH_txt"Symbol 262 MovieClip Frame 2Symbol 249 EditableText
"finalPix"Symbol 262 MovieClip Frame 2Symbol 11 Button [pixel]
"redB_txt"Symbol 262 MovieClip Frame 2Symbol 250 EditableText
"blueB_txt"Symbol 262 MovieClip Frame 2Symbol 251 EditableText
"greenB_txt"Symbol 262 MovieClip Frame 2Symbol 252 EditableText
"red_input"Symbol 262 MovieClip Frame 3Symbol 253 EditableText
"green_input"Symbol 262 MovieClip Frame 3Symbol 254 EditableText
"blue_input"Symbol 262 MovieClip Frame 3Symbol 255 EditableText
"redB_txt"Symbol 262 MovieClip Frame 3Symbol 256 EditableText
"greenB_txt"Symbol 262 MovieClip Frame 3Symbol 257 EditableText
"blueB_txt"Symbol 262 MovieClip Frame 3Symbol 258 EditableText
"finalPix"Symbol 262 MovieClip Frame 3Symbol 10 Button [pixel]
"redH_txt"Symbol 262 MovieClip Frame 3Symbol 259 EditableText
"greenH_txt"Symbol 262 MovieClip Frame 3Symbol 260 EditableText
"blueH_txt"Symbol 262 MovieClip Frame 3Symbol 261 EditableText
"tracer"Symbol 307 MovieClip Frame 2Symbol 264 EditableText
"v13_txt"Symbol 307 MovieClip Frame 2Symbol 265 EditableText
"v12_txt"Symbol 307 MovieClip Frame 2Symbol 269 EditableText
"v14_txt"Symbol 307 MovieClip Frame 2Symbol 270 EditableText
"v15_txt"Symbol 307 MovieClip Frame 2Symbol 271 EditableText
"v8_txt"Symbol 307 MovieClip Frame 2Symbol 273 EditableText
"v9_txt"Symbol 307 MovieClip Frame 2Symbol 274 EditableText
"v10_txt"Symbol 307 MovieClip Frame 2Symbol 275 EditableText
"v11_txt"Symbol 307 MovieClip Frame 2Symbol 276 EditableText
"v4_txt"Symbol 307 MovieClip Frame 2Symbol 281 EditableText
"v5_txt"Symbol 307 MovieClip Frame 2Symbol 282 EditableText
"v6_txt"Symbol 307 MovieClip Frame 2Symbol 283 EditableText
"v7_txt"Symbol 307 MovieClip Frame 2Symbol 284 EditableText
"v0_txt"Symbol 307 MovieClip Frame 2Symbol 289 EditableText
"v1_txt"Symbol 307 MovieClip Frame 2Symbol 290 EditableText
"v2_txt"Symbol 307 MovieClip Frame 2Symbol 291 EditableText
"v3_txt"Symbol 307 MovieClip Frame 2Symbol 292 EditableText
"pc_txt"Symbol 307 MovieClip Frame 2Symbol 297 EditableText
"i_txt"Symbol 307 MovieClip Frame 2Symbol 298 EditableText
"delay_txt"Symbol 307 MovieClip Frame 2Symbol 299 EditableText
"sound_txt"Symbol 307 MovieClip Frame 2Symbol 300 EditableText

Special Tags

Protect (24)Timeline Frame 131 bytes "..$1$YR$KhRyo/W9D7/jdzDDEEsZw1."
ExportAssets (56)Timeline Frame 1Symbol 8 as "pixelLine"
ExportAssets (56)Timeline Frame 1Symbol 10 as "pixel"
ExportAssets (56)Timeline Frame 1Symbol 11 as "pixel"
ExportAssets (56)Timeline Frame 1Symbol 12 as "pixel"
ExportAssets (56)Timeline Frame 1Symbol 13 as "pixel"
ExportAssets (56)Timeline Frame 1Symbol 16 as "test"
ExportAssets (56)Timeline Frame 1Symbol 16 as "test"
ExportAssets (56)Timeline Frame 1Symbol 13 as "pixel"
ExportAssets (56)Timeline Frame 1Symbol 13 as "pixel"
ExportAssets (56)Timeline Frame 1Symbol 13 as "pixel"
ExportAssets (56)Timeline Frame 1Symbol 12 as "pixel"
ExportAssets (56)Timeline Frame 1Symbol 13 as "pixel"
ExportAssets (56)Timeline Frame 1Symbol 13 as "pixel"
ExportAssets (56)Timeline Frame 1Symbol 13 as "pixel"
ExportAssets (56)Timeline Frame 1Symbol 11 as "pixel"
ExportAssets (56)Timeline Frame 1Symbol 13 as "pixel"
ExportAssets (56)Timeline Frame 1Symbol 13 as "pixel"
ExportAssets (56)Timeline Frame 1Symbol 13 as "pixel"
ExportAssets (56)Timeline Frame 1Symbol 10 as "pixel"
ExportAssets (56)Timeline Frame 1Symbol 312 as "__Packages.Chip8"
ExportAssets (56)Timeline Frame 1Symbol 313 as "__Packages.Screen"

Labels

"romlist"Symbol 161 MovieClip Frame 1
"s8romlist"Symbol 161 MovieClip Frame 2
"inputDec"Symbol 262 MovieClip Frame 1
"inputHex"Symbol 262 MovieClip Frame 2
"inputBin"Symbol 262 MovieClip Frame 3
"tutorial"Symbol 307 MovieClip Frame 1
"debugger"Symbol 307 MovieClip Frame 2




http://swfchan.com/15/72474/info.shtml
Created: 8/4 -2019 18:29:00 Last modified: 8/4 -2019 18:29:00 Server time: 23/12 -2024 00:40:37