NESDev and Strangulation Records messageboards
Forum Index | FAQ | New User | Login | Search

Previous ThreadView All ThreadsNext ThreadShow in Flat Mode*


SubjectRe: Opcodes that can be used to Read/Write to Registers  
Posted byRedKnight
Posted on1/15/04 9:18 PM
From IP64.80.240.90  



hmm... as it stands, my memory emulation is integrated completly with my CPU emulation - i dont have any read_mem or write_mem functions - each individual opcode has the ability to read or write at will...

which created my dilemna in the first place - i didnt want to code by hand checks for registers for each potential opcode, but rather write a top-level function that could handle registers as special cases ... the opcodes would still do the actual reading/writing, but my check_registers() function would set flags indicating what registers were being written or read to.

see, the way my CPU emulation works is that i call a function Step() that executes one opcode - it reads the opcode from the program counter, then switches based on the opcode - creating a 256 case switch statement. each case is emulated individually. right now im trying to streamline things by writing a common group of functions for addressing modes and stuff...



-
Entire Thread
Subject  Posted byPosted On
*Opcodes that can be used to Read/Write to Registers  RedKnight1/8/04 07:53 AM
.*Re: Opcodes that can be used to Read/Write to Registers  RedKnight1/15/04 06:24 AM
..*Re: Opcodes that can be used to Read/Write to Registers  blargg1/15/04 6:43 PM
....Re: Opcodes that can be used to Read/Write to Registers  RedKnight1/15/04 9:18 PM
....*Re: Opcodes that can be used to Read/Write to Registers  tepples1/15/04 10:24 PM
..*Re: Opcodes that can be used to Read/Write to Registers  tepples1/15/04 3:37 PM
.*Re: Opcodes that can be used to Read/Write to Registers  Memblers1/8/04 08:20 AM
..*Re: Opcodes that can be used to Read/Write to Registers  RedKnight1/8/04 08:42 AM
...*Re: Opcodes that can be used to Read/Write to Registers  Memblers1/8/04 09:10 AM
....*Re: Opcodes that can be used to Read/Write to Registers  tepples1/9/04 01:29 AM
....*Re: Opcodes that can be used to Read/Write to Registers  RedKnight1/8/04 09:17 AM
.....*And watch programs fail  tepples1/9/04 01:27 AM
.....*Re: Opcodes that can be used to Read/Write to Registers  blargg1/8/04 4:40 PM
.....*Re: Opcodes that can be used to Read/Write to Registers  Memblers1/8/04 09:43 AM
......*Re: Opcodes that can be used to Read/Write to Registers  tepples1/9/04 01:34 AM
.......*Re: Opcodes that can be used to Read/Write to Registers  RedKnight1/12/04 07:53 AM
........*Re: Opcodes that can be used to Read/Write to Registers  tepples1/12/04 4:47 PM
.........*Re: Opcodes that can be used to Read/Write to Registers  workingclass771/12/04 5:34 PM
..........*Re: Opcodes that can be used to Read/Write to Registers  quietust1/12/04 11:07 PM
..*Re: Opcodes that can be used to Read/Write to Registers  Memblers1/8/04 08:32 AM
Jump to

Memblers' homepage             Contact Me

Forums powered by WWWThreads Demo