abstract class GB::Cartridge
- GB::Cartridge
- Reference
- Object
Direct Known Subclasses
Defined in:
crab/gb/cartridge.crConstructors
-
.new(rom_path : String) : Cartridge
open rom, determine MBC type, and initialize the correct cartridge
-
.new(rom : Bytes) : Cartridge
create a new Cartridge with the given bytes as rom
Instance Method Summary
-
#[](index : Int) : UInt8
read from cartridge memory
- #[]=(index : Int, value : UInt8) : Nil
- #cgb : CGB
-
#load_game : Nil
load the game from a .sav file
-
#ram_bank_offset(bank_number : Int) : Int
the offset of the given bank number in ram
-
#ram_offset(index : Int) : Int
adjust the index for local ram
- #ram_size : Int32
-
#rom_bank_offset(bank_number : Int) : Int
the offset of the given bank number in rom
-
#rom_offset(index : Int) : Int
adjust the index for local rom
- #rom_size : UInt32
- #sav_file_path : String
- #sav_file_path=(sav_file_path : String)
-
#save_game : Nil
save the game to a .sav file
- #title : String
Constructor Detail
open rom, determine MBC type, and initialize the correct cartridge
create a new Cartridge with the given bytes as rom