CPU::Emulator::6502 - Class representing a 6502 CPU
acc - Accumulator
x
y
pc - Program Counter
sp - Stack Pointer
status
Dynamically loads all instructions from the CPU::Emulator::6502::Op namespace and creates a table.
Simulate a hardware reset or power-on
Reads data from $address in memory.
$address
Writes $data to $address in memory.
$data
Reads the op from memory then moves the program counter forward 1.
This will return of a string with some debugging info, including: the current instruction, the pc location of the instruction, 10 lines of context from the PRG at the pc location and the state of the stack, sp, a, x, y and status registers after the op has executed.
Sets the Sign and Zero status flags based on $value.
$value
Pushes $value onto the stack and decrements the stack pointer.
Increments the stack pointer and returns the current stack value.
Branches if $bool is true.
$bool
Combines $lo and $hi into a 16-bit word.
$lo
$hi
Returns the lower byte of $word.
$word
Returns the higher byte of $word.
Brian Cassidy <bricas@cpan.org>
Copyright 2007 by Brian Cassidy
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Games::NES::Emulator
To install Games::NES::Emulator, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Games::NES::Emulator
CPAN shell
perl -MCPAN -e shell install Games::NES::Emulator
For more information on module installation, please visit the detailed CPAN module installation guide.