key press instructions
This commit is contained in:
parent
232661bbbe
commit
43c17693a9
|
@ -129,7 +129,9 @@ func (emulator *Emulator) Cycle() {
|
|||
case 0xE:
|
||||
switch instruction & 0x00FF {
|
||||
case 0x9E: // SKP Vx
|
||||
emulator.SkipKeyPressed(x)
|
||||
case 0xA1: // SKNP Vx
|
||||
emulator.SkipKeyNotPressed(x)
|
||||
}
|
||||
case 0xF:
|
||||
switch instruction & 0x00FF {
|
||||
|
|
|
@ -227,3 +227,19 @@ func (emulator *Emulator) Draw(x uint8, y uint8, n uint8) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Skip next instruction if key with the value of Vx is pressed.
|
||||
//
|
||||
// Checks the keyboard, and if the key corresponding to the value of Vx
|
||||
// is currently in the down position, PC is increased by 2.
|
||||
func (emulator *Emulator) SkipKeyPressed(x uint8) {
|
||||
// TODO: implement input
|
||||
}
|
||||
|
||||
// Skip next instruction if key with the value of Vx is not pressed.
|
||||
//
|
||||
// Checks the keyboard, and if the key corresponding to the value of Vx
|
||||
// is currently in the up position, PC is increased by 2.
|
||||
func (emulator *Emulator) SkipKeyNotPressed(x uint8) {
|
||||
// TODO: implement input
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user