mirror of
https://github.com/macocianradu/goboy.git
synced 2026-03-18 21:10:07 +00:00
changed naming to have multiuple functions files for each row in the
optable
This commit is contained in:
@@ -10,7 +10,7 @@ type op_context struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 0x00 NOOP function
|
// 0x00 NOOP function
|
||||||
func Noop(context op_context) {
|
func NOOP(context op_context) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
20
cpu/functions0x1.go
Normal file
20
cpu/functions0x1.go
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
package cpu
|
||||||
|
|
||||||
|
import (
|
||||||
|
"radu.macocian.me/goboy/cpu/operations"
|
||||||
|
)
|
||||||
|
|
||||||
|
/*
|
||||||
|
0x10 STOP Execution of a STOP instruction stops both the system clock and oscillator circuit. STOP mode is entered and the LCD controller also stops. However, the status of the internal RAM register ports remains unchanged.
|
||||||
|
|
||||||
|
STOP mode can be cancelled by a reset signal.
|
||||||
|
If the RESET terminal goes LOW in STOP mode, it becomes that of a normal reset status.
|
||||||
|
The following conditions should be met before a STOP instruction is executed and stop mode is entered:
|
||||||
|
|
||||||
|
All interrupt-enable (IE) flags are reset.
|
||||||
|
Input to P10-P13 is LOW for all.
|
||||||
|
*/
|
||||||
|
func STOP(context op_context) {
|
||||||
|
//TODO
|
||||||
|
return
|
||||||
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package cpu
|
package cpu
|
||||||
|
|
||||||
var OpTable = [256]func(context op_context){
|
var OpTable = [256]func(context op_context){
|
||||||
Noop, //0x00
|
NOOP, //0x00
|
||||||
LDBCd16, //0x01
|
LDBCd16, //0x01
|
||||||
LDBCa, //0x02
|
LDBCa, //0x02
|
||||||
INCBC, //0x03
|
INCBC, //0x03
|
||||||
@@ -17,4 +17,6 @@ var OpTable = [256]func(context op_context){
|
|||||||
DECC, //0x0D
|
DECC, //0x0D
|
||||||
LDCd8, //0x0E
|
LDCd8, //0x0E
|
||||||
RRRCA, //0x0F
|
RRRCA, //0x0F
|
||||||
|
|
||||||
|
STOP, //0x10
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user