defined some constants
This commit is contained in:
parent
5af19969ce
commit
3d4e91aa40
|
@ -17,6 +17,12 @@ const (
|
||||||
VideoBufferAddress = uint16(0x0F00)
|
VideoBufferAddress = uint16(0x0F00)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
Width = 64
|
||||||
|
Height = 32
|
||||||
|
FPS = 60
|
||||||
|
)
|
||||||
|
|
||||||
type Emulator struct {
|
type Emulator struct {
|
||||||
V [16]uint8 // general registers
|
V [16]uint8 // general registers
|
||||||
I uint16 // address register
|
I uint16 // address register
|
||||||
|
|
|
@ -36,12 +36,12 @@ func GetEmulatorInfo(info *C.retro_system_info) {
|
||||||
|
|
||||||
//export GetEmulatorAVInfo
|
//export GetEmulatorAVInfo
|
||||||
func GetEmulatorAVInfo(info *C.retro_system_av_info) {
|
func GetEmulatorAVInfo(info *C.retro_system_av_info) {
|
||||||
info.geometry.base_width = 64
|
info.geometry.base_width = chip8.Width
|
||||||
info.geometry.base_height = 32
|
info.geometry.base_height = chip8.Height
|
||||||
info.geometry.max_width = 64
|
info.geometry.max_width = chip8.Width
|
||||||
info.geometry.max_height = 32
|
info.geometry.max_height = chip8.Height
|
||||||
info.geometry.aspect_ratio = 0.0
|
info.geometry.aspect_ratio = 0.0
|
||||||
info.timing.fps = 60
|
info.timing.fps = chip8.FPS
|
||||||
info.timing.sample_rate = 44100
|
info.timing.sample_rate = 44100
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user