mirror of
https://github.com/mcanlas/6502-opcodes.git
synced 2024-05-28 21:41:31 +00:00
isolated generated opcodes
This commit is contained in:
parent
e250dfb67e
commit
66e41e42fc
|
@ -9,13 +9,13 @@ object MatchOpcodes {
|
|||
def main(args: Array[String]): Unit =
|
||||
write(args(0))(doStuff)
|
||||
|
||||
def doStuff(out: PrintWriter): Unit = {
|
||||
val generated =
|
||||
(0 to 255)
|
||||
.map(n => n -> toOpcode(n))
|
||||
.collect { case (n, Some(x)) => (n, x) }
|
||||
.toMap
|
||||
def generatedOpcodes: Map[Int, (Instruction, AddressingMode)] =
|
||||
(0 to 255)
|
||||
.map(n => n -> toOpcode(n))
|
||||
.collect { case (n, Some(x)) => (n, x) }
|
||||
.toMap
|
||||
|
||||
def doStuff(out: PrintWriter): Unit = {
|
||||
val injected =
|
||||
Map(
|
||||
0x10 -> BPL,
|
||||
|
@ -58,7 +58,7 @@ object MatchOpcodes {
|
|||
0xEA -> NOP
|
||||
).mapValues(x => x -> Implied)
|
||||
|
||||
val lookup = generated ++ injected
|
||||
val lookup = generatedOpcodes ++ injected
|
||||
|
||||
out.print("<table>")
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user