defined some constants

This commit is contained in:
Jairinho 2022-02-24 16:01:13 -03:00
parent 5af19969ce
commit 3d4e91aa40
No known key found for this signature in database
GPG Key ID: 954589B18A21D5B6
2 changed files with 11 additions and 5 deletions

View File

@ -17,6 +17,12 @@ const (
VideoBufferAddress = uint16(0x0F00)
)
const (
Width = 64
Height = 32
FPS = 60
)
type Emulator struct {
V [16]uint8 // general registers
I uint16 // address register

View File

@ -36,12 +36,12 @@ func GetEmulatorInfo(info *C.retro_system_info) {
//export GetEmulatorAVInfo
func GetEmulatorAVInfo(info *C.retro_system_av_info) {
info.geometry.base_width = 64
info.geometry.base_height = 32
info.geometry.max_width = 64
info.geometry.max_height = 32
info.geometry.base_width = chip8.Width
info.geometry.base_height = chip8.Height
info.geometry.max_width = chip8.Width
info.geometry.max_height = chip8.Height
info.geometry.aspect_ratio = 0.0
info.timing.fps = 60
info.timing.fps = chip8.FPS
info.timing.sample_rate = 44100
}