Monthly Archive for December, 2005

Effects: Plasma and Explosion


The picture shows an oldschool plasma done in Flash8.5 and another plasma in Flash8. The AS3 version is only 128×128 px small and because of the slow setPixel function not very fast. It looks good when it is bigger but this would decrease the fps a lot. I came across a new plasma method when I tried to create some fire using the perlinNoise in Flash8. I blend the channels in different kinds to get this nice effect. The best thing is that it looks really fluid and is very fast.Another quickie here is an explosion effect. I really like that fire palette :)

Chip8 emulator

Chip8 emulatorHere it is – a “working” Chip8 emulator done using Actionscript3. This idea came from AndrĂ© Michelle when he asked in the Flashforum who would be interested in working on an emulator. I am always interested in working with assembler, memory access and things like shellcode. :)

I found a lot of information about emulating Chip8 using Google. Good resources were EmuTalk.net, CHIP8 (also an emulator), and a list where all ASM instructions are explained.

Emulating Chip8 is a very easy thing. You have just a small manageable piece of instructions and a simple sort of memory. But I have to mention that my emulator has got some bugs because it is hard to test your piece of work. An error could be in every function (like add, substract, etc.) or even where a variable gets stored in the register.
Because of this I wrote a simple disassembler. The output is the whole rom in ASM syntax which Flash “evaluates”.
This is how the debugger outputs the instructions (Address: opCode ASMequivalent):
[code]0x03a3: 0x13af jmp 943
0x03af: 0xa50a mvi 1290
0x03b1: 0xf01e adi v0
0x03b3: 0xdbc6 sprite v11,v12,6[/code]

In fact it is not very easy to recognize an error but makes it more comfortable. I would suggest to take a look at the function in AS3 instead of trying to figure out what the ASM code really does but I was able to find some bugs with the ASM instructions. Another thing with the memory was comparing my memory to the memory of an emulator written in C++.

Currently all keys are a little bit screwed because I have no time to take a closer look here. You can play the MISSILE rom online and of course play around with the sourcecode which has a lot of comments. You can press i to shot if you play the MISSILE game; space resets the emulator. Have fun with this oldschool machine :o)