class

GB::Cartridge

Inherits Reference < Object

Constructors

new(rom_path : String) : Cartridge

open rom, determine MBC type, and initialize the correct cartridge

Source
new(rom : Bytes) : Cartridge

create a new Cartridge with the given bytes as rom

Source

Instance methods

[](index : Int) : UInt8

read from cartridge memory

Source
[]=(index : Int, value : UInt8) : Nil
Source
load_game

load the game from a .sav file

Source
ram_bank_offset(bank_number : Int) : Int

the offset of the given bank number in ram

Source
ram_offset(index : Int) : Int

adjust the index for local ram

Source
ram_size
Source
rom_bank_offset(bank_number : Int) : Int

the offset of the given bank number in rom

Source
rom_offset(index : Int) : Int

adjust the index for local rom

Source
rom_size
Source
sav_file_path
Source
sav_file_path=(sav_file_path : String)
Source
save_game

save the game to a .sav file

Source
title
Source

Nested types