Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

GB-Chip

From GameBrew
Revision as of 10:43, 30 July 2024 by HydeWing (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
GB-Chip
Gbchip8.png
General
AuthorAnders Granlund
TypeComputer
Version0.6
LicenseMixed
SystemDMG
Last Updated1998/04/22
Links
Download
Website
Source

GB-CHIP8 is an emulator that allows you to play CHIP8 and SUPER-CHIP8 games on your Game Boy or Game Boy emulator.

The emulator is written in assembler (TASM with Jeff Frohwein's Game Boy table) and will emulate the CHIP8 in full speed. The SCHIP8 game could be slower than the original in some games.

User guide

About

CHIP8 is an interpreted programming language developed in the mid-1970s. It was primarily designed for creating simple video games on microcomputers at that time. The language uses a virtual machine approach, where programs written in CHIP-8 are run on a virtual machine called the CHIP-8 interpreter.

There's also something called the SUPER-CHIP8. The S-CHIP8 has better resolution and a few more commands. Both the CHIP8 and the SUPER-CHIP8 is fully emulated in this emulator.

CHIP8 spec:

  • Resolution - 64 * 32 pixels.
  • Sound - Yes, single tone beeper.
  • Colours - Black & white.
  • Controller - 16 Button (hex) keyboard.
  • Graphics - "sprites" always XOR'ed against the background.

S-CHIP8 spec:

  • Resolution - 128 * 64 pixels.
  • Sound - Yes, single tone beeper.
  • Colours - Black & white.
  • controller - 16 Button (hex) keyboard.
  • Graphics - "sprites" always XOR'ed against the background.
    • Vertical scrolling (down) 1-16 pixels at a time.
    • Horizontal scrolling (left/right) 4 pixels at a time.

How to use

There are two ways of using the GB-Chip8 interpreter: single-game or multi-game mode.

  • SINGLE-GAME - Only one CHIP8 game on the Game Boy cart.
  • MULTI-GAME - Up to 11 games on one Game Boy cart (composed by CHIPMENU.EXE).

SINGLE-GAME:

The file GBCHIP8.DAT is the emulator-program, you need to "merge" this file with the chip8-game.

example (in DOS): copy /B GBCHIP8.DAT /B + [chip8 game] GBCHIP8.GB

This will create a new file called GBCHIP8.GB containing the emulator and your chip8-game.

(You must use a program like RGBFIX or similar to pad the "GBCHIP8.GB" into 64Kb and also correct the checksum in order to be able to run this on a real Game Boy.)

MULTI-GAME:

You need to run CHIPMENU.EXE (only avaliable for MS-DOS) to create a multi-game cart.

example for CHIPMENU: CHIPMENU.EXE [game1] [game2] [game4] ..... [game11]

This will create a file called GBCHIP8.GB that's ready to be run on your Game Boy / Game Boy-emulator.

(The program will look for RGBFIX.EXE in order to automatically correct the checksum, if it can't find it you must correct it somehow before you can run it on the real Game Boy. )

Main menu

When running the cart you will see a menu looking like this:

  • LOAD GAME - Run a chip8 game.
  • CONFIGURE JOYPAD - Set the joypad settings.
  • OPTIONS - Options menu.
  • ABOUT - Some info.

On a multicart, pressing the LOAD-GAME menu will bring you up to a menu of all the games you chosed with GAMEMENU. Pressing on a name will start the game!

On a single cart, pressing LOAD-GAME will run the game that is on the cart.

Joystick configuration

This screen looks like this:

	 UP:    ?
1 2 3 C  DOWN:
	 LEFT:
4 5 6 D  RIGHT:

7 8 9 E  A:
	 B:
A 0 B F	 START:
	 SELECT:

   ^       ^
   |       |---  This is the Game Boy buttons
   |
   |
   |
   |--- The Chip8 16-button keyboard

Since the chip8 uses 16-buttons and the Game Boy has only 8, you won't be able to control all of the chip8-buttons with the emulator. And as different games uses different button-settings you will need to change the joypad settings for almost every game you play.

You will be prompted to select what the Game Boy buttons should be mapped as on the chip8 keyboard.

Pressing Select will abort, and send you to another screen:

  • multi-game: Main Menu.
  • single-game: Resets the chip8 and starts it over.

Options menu

  • SOUND - Turn the sound ON/OFF.
  • COLLISSIONS - Turn the collision detection ON/OFF.
  • FORCE SCHIP - Force all the games to run in Super Chip mode.
  • CHIP8 DELAY - Set speed for Chip8 games (0 = fastest, 250 = slowest).
  • DONE - Go back to the main menu.

Known keyboard mappings

Here are the controls for some Chip8 games:

Game		Action		Button (chip8-keyboard)
----		------		----------------------- 
Blinky		move up		3
		move down	6
		move left	7	
		move right	8
		start		B

Blitz		fire bomb	5

Brix		move left	4
		move right	6

Invaders	move left	4
		move right	6
		fire/start	5

Missile		fire missile	8

Vbrix		move up		1
		move down	4
		start		7

Pong/Pong2	player1 up	1
		player1 down	4
		player2 up	C
		player2 down	D

Tank		move up		8
		move down	2
		move left	4
		move right	6
		fire		5

Tetris		Rotate		4
		move left	5
		move right	6
		drop		7

Ufo		fire up/left	4
		fire up		5
		fire up/right	6

Vers		player1 up	7
		player1 down	A
		player1 left	1
		player1 right	2
		player2 up	C
		player2 down	D
		player2 left	B
		player2 right	F

Wipeoff		move left	4
		move right	6

Syzygy		start		F
		move up		3
		move down	6
		move left	7
		move right	8

Controls

Select - Main Menu (multi-game), Reset the chip8 (single-game)

Select+Start - Load Game menu (multi-game), Joystick config screen (single-game)

A+B+Start+Select - Reset the Game Boy

Changelog

v0.6 (4th official release) 1998/04/16

  • GB-Chip8 is discontinued... All games seems to work ok, so there's no need to work on it longer. Also. I doub't anyone uses this as the feedback is *very* low, in fact only one person has given me any feedback at all.
  • This release will probably be the final and comes with full sourcecode in TASM format.

1998/04/07

  • The emulator now automaticly skips the HP48 header if there is one, no need to convert the games from the HP48 format before running it with the emulator.
  • Made the 4*5 fonts a bit nicer.

1998/04/06

  • Fixed a bug when resetting the Gameboy in single-game mode.
  • ALL games that has been tested so far works OK.

v0.5 (3rd official release) 1998/04/06

  • Fixed bug in random-number command.. Made a couple of games work. (WORM3, puzzle, puzzle15 etc..)
  • Added another option in the OPTIONS-MENU: set chip8 delay, it lets you set the speed of CHIP8 games (does not affect CHIP games)
  • Both single- and multigame carts starts at the main menu.

v0.4 (2nd official release) 1998/04/05

  • S-CHIP 8x10 fonts now works.
  • Just a few SCHIP games won't work... Almost every game tested works perfect though.

1998/04/04

  • All S-CHIP8 commands are implemented except for the 8x10 character set...
  • Added a new menu: "OPTIONS", with options for setting sound and collisions ON/OFF and also "force s-chip" for forcing the emulator to always use the super-chip.
  • MAJOR speedup in sprite drawings... The emulator is now acctually too fast as the games becomes unplayable. Need to implement a slowdown routine...

1998/04/03

  • Super-Chip games now runs.
  • Scrolling works in all directions... (slow)
  • Removed bug in 16x16 sprites drawing.

v0.3 (1st official release) 1998/04/02

  • Made the menus for the game.
  • Joypad configuration.
  • removed a bug in the CHIPMENU.EXE.
  • Fixed a joypad-bug.
  • Fixed graphics-bug.
  • Added detection of CHIP8/SCHIP8 game.

1998/04/01

  • All opcodes are emulated and seems to be free from bugs.
  • Total remake of the sprite-drawing engine...
  • The screen is zoomed to double size.
  • Sound is fully emulated
  • Made a nicer looking play-screen.
  • Collision detection is implemented.
  • Fixed a bug when loading/storeing the registers, finally got the space-invaders scroller working and blinky works now also.
  • 16x16 sprites 'might' work now.
  • BCD-storage of Vx registers works -> numbers looks OK.
  • Prevents chip8-games from drawing offscreen.
  • Fake random number generator (table).
  • Multi-cart menu composer (for MS-DOS), handles 11 Chip8 games.
  • Autodetection of multicart or single game. Game menu for multicart games.

1998/03/31

  • Most of the games tested looks pretty good.
  • ~90% of the opcodes emulated and seems to be working fine.
  • 8xN sized sprites is beeing drawn (not yet perfect).
  • Built in fonts are emulated.
  • The 16x16 sprite is not yet implemented.
  • Timing is emulated... Seems close enough.
  • Very lousy keypad emulation.
  • Sprite collisions not yet implemented.
  • No random number routines yet.
  • Y-axis screen doubler... makes the tiny screen a little bigger.

1998/03/30

  • Started working on the emu. Got the opcodes emulated by aprox. 50%.

Credits

Credits goes to David Winter for his MS-DOS based Chip8 emulator and for his info on how the chip8 works,

External links

Advertising: