:blush:SculleatR said:Thnx Cyberman, is the Gameboy emulateable with the Z80 processor. i currently added GB opcodes:
i cant write LDI (HL), ACode:Public Const LDI As Long = 0 Public Const HL As Long = 1 Public Const A As Long = 2 Select Case xxxxx case LDI, HL, A
SculleatR said:Thnx Cyberman, is the Gameboy emulateable with the Z80 processor. i currently added GB opcodes:
Code:Public Const LDI As Long = 0 Public Const HL As Long = 1 Public Const A As Long = 2 Select Case xxxxx case LDI, HL, A i cant write LDI (HL), A [/B][/QUOTE] but ofcourse i added all (i think) opcodes
Cyberman said:I strongly urg you to grab MAME source code and look at the Z80 CPU emulator they have in it..
SculleatR said:Thnx Cyberman, is the Gameboy emulateable with the Z80 processor. i currently added GB opcodes:
Code:Public Const LDI As Long = 0 Public Const HL As Long = 1 Public Const A As Long = 2 Select Case xxxxx case LDI, HL, A i cant write LDI (HL), A [/B][/QUOTE] First of all, you dont declare every opcode. You read the opcode first then run a switch statement. opcode = ReadByte(from_rom) switch(opcode) case 0x1 etc... I would say more, but I think you'd be better off getting some more experience in programming.
aprentice said:First of all, you dont declare every opcode. You read the opcode first then run a switch statement.
opcode = ReadByte(from_rom)
switch(opcode)
case 0x1 etc...
I would say more, but I think you'd be better off getting some more experience in programming.
If xxx = 10 Then ' RLC (HL)
regHL = rlc(regHL)
opcodes = 8