WIP
This commit is contained in:
35
gb/bus.go
Normal file
35
gb/bus.go
Normal file
@@ -0,0 +1,35 @@
|
||||
package gb
|
||||
|
||||
// import (
|
||||
// "fmt"
|
||||
// )
|
||||
|
||||
// type Bus struct {
|
||||
// Cart *Cartridge
|
||||
// }
|
||||
|
||||
// func NewBus(cart *Cartridge) *Bus {
|
||||
// bus := Bus{Cart: cart}
|
||||
|
||||
// return &bus
|
||||
// }
|
||||
|
||||
// func (bus *Bus) Read(address uint16) (byte, error) {
|
||||
// if address < 0x8000 {
|
||||
// // ROM data
|
||||
// return bus.Cart.Read(address), nil
|
||||
// } else {
|
||||
// return 0, fmt.Errorf("Reading from address %X not implemented!", address)
|
||||
// }
|
||||
// }
|
||||
|
||||
// func (bus *Bus) Write(address uint16, value byte) error {
|
||||
// if address < 0x8000 {
|
||||
// // ROM data
|
||||
// bus.Cart.Write(address, value)
|
||||
|
||||
// return nil
|
||||
// } else {
|
||||
// return fmt.Errorf("Writing to address %X not implemented!", address)
|
||||
// }
|
||||
// }
|
||||
Reference in New Issue
Block a user