You can support the development on the Github Sponsors page.


Tools > CHIP-80


A CHIP-8 Interpreter/VM/Emulator
made by StinkerB06
uploaded by StinkerB06
added:
updated:
download cartridge
- CLICK TO PLAY -

4


To load a ROM:
On the TIC-80 command line, type "import map". Then select your .ch8 ROM. The ROM file is then loaded into map memory, making sure the memory is cleared first.

Controls (QWERTY = CHIP-8):
1-2-3-4 = 1-2-3-C
Q-W-E-R = 4-5-6-D
A-S-D-F = 7-8-9-E
Z-X-C-V = A-0-B-F


*** What's a CHIP-8, you might ask? ***

The CHIP-8 was a pretty simple virtual machine that originally ran on some late 70's computers (starting with the RCA COSMAC VIP kit computer). There were almost 4KiB of RAM in total and featured simple 64x32 monochrome graphics. The VM's CPU had sixteen 8-bit general-purpose data registers, a 12-bit program counter, a call stack of at least 12 return addresses, a 12-bit address register, an 8-bit 60Hz timer, a simple beeper, and a (pretty-limited) RISC-style instruction set to add it all up.

Read more: https://en.wikipedia.org/wiki/CHIP-8


Update 1, released September 25th, 2019:
- Fixed an error with the CALL opcode. Dumb typos. Pong 2 hack now plays.
- Prevent crashing with illegal opcode. Show a little message in the top-left corner instead.
- Re-positioned the CHIP-8 screen to the center, so that it's more comfortable.

Update 2, released September 28th, 2019:
- Stack memory and framebuffer are now independent from main RAM. Fixes Tetris's graphical glitches.
- Added code disassembly view at the bottom.
- More fixes.

Update 3, released November 27th, 2019:
- Forgot to change the number of one of the opcodes in the disassembly view. Fixed now.

Update 4, released August 2nd, 2020:
- OVR() is now being used to upscale the CHIP-8 display area in the TIC() framebuffer, so now I can properly show the screen at 3X scale, making it more comfortable to the eyes. Most drawing API functions in OVR() won't affect the framebuffer, so it doesn't mess with the work area.
- Now using format() with hex formatting, so I can display most registers in hexadecimal. Thanks to someone in Discord for helping me out, I don't understand a lot of this weird formatting stuff!
- Changed the TIC-80 default beeper tone to something more old-school! Why not recreate the RCA Studio II buzzer noise?
- More code optimizations.

Comments


masternama

Hmm... I see through code editor looks like hardware?

StinkerB06

Also, I decided to swap out the Pong ROM with a much less boring version.

Stinker2006

Here's my 2nd test account!

StinkerB06

I can't even see the notification about #1926, because on my main account (this one), the notifications page is showing a 502: Bad Gateway error no matter what I do. On my 2nd test account (@Stinker2006), it shows up just fine.

Could mean that my notifications page's data got corrupted (which results in the web server not fetching the page at all), but that's my guess.

masternama

I got Idea!.

Experiment:

Go to Sprite editor. draw a huge draw. Go to Map Editor edit your Map ROM.

Results

ROM gets corrupted while running CHIP-80 virtual machine see got error & Corruption effects.

SergioFLSgd

This is so cool. I've also tried making a CHIP-8 VM on another FC. It booted some programs but i've never got it to work properly.

StinkerB06

@SergioFLSgd Is that fantasy console PICO-8? Or something else?

masternama

Overlay Background?

function OVR()
for y=31,0,-1 do for x=63,0,-1 do
rect(X+x*3,Y+y*3,3,3,pix(X+x,Y+y))
end end

SergioFLSgd

#2879 It's Homegirl.


Post comment