Home
Development
OpCodes
Technical
Screen Shots
Downloads
JavaDocs
NES Specs
Links
Help
Feedback
Admin


monkeycoder();
MonkeyNES Help

OpCode Test Shell Help
MonkeyNES OpCode Test Shell
Type 'help' for available commands

Warning:  This test shell replaces $0000-$0002 with the requested
          OpCode.  No effect of executing the OpCode is restored.


> help
Syntax: help [command]
  command - the command for which you want more detailed help.

Command List:
  #         clear     help      load      memclear  
  memget    memset    op        opx       power     
  ppu       regs      regset    rom       save      
  sprclear  sprget    sprset    step      test      
  vidclear  vidget    vidset    

> help #
Syntax:  # [comment]
  comment - Text that will not be parsed by the command processor.
            This text will still be outputted to the shell.
- Note that the space following the # is required as the # is 
  actually the command.

> help clear
Syntax:  clear
  Clears the output buffer.

> help help
Syntax:  help [command]
  command - The command for which you want more detailed help.

> help load
Syntax:  load [script]
  script - The path to a script file containing a sequence of
           test commands to execute.

> help memclear
Syntax:  memclear
  Clears main memory to all zeros.

> help memget
Syntax:  memget [value]
  addr  - 2 byte hex position in memory to get the value from.
- Accesses main system memory.

> help memset
Syntax:  memset [addr] [value]
  addr  - 2 byte hex position in memory to set.
  value - 1 byte hex value to set.
- Accesses main system memory.

> help op
Syntax:  op [opcode] [param]
  opcode - The hex of the opcode to execute.
  param  - The 0 to 2 bytes of hex to use as the params to the
           opcode.
- For more info about opcodes and their expected params please
  check out http://monkeycoder.com/monkeynes/opcodes.php
- All hex is expected as plain text with no prefix of '$' or '0x'
  and is expected to be 0 padded appropriately.
- Please note param values are expected low order byte first like
  they would be from the rom.

> help opx
Syntax:  opx [6502]
  6502 - Operation to execute in 6502 assembly.
- For more info about opcode syntax please check out
  http://monkeycoder.com/monkeynes/opcodes.php
- This command parses the 6502 code and passes it to
  the op command.

> help power
Syntax:  power [state]
  state - on|off - turns on or off the NES hardware.
                   (just sets register values)

> help ppu
Syntax:  ppu [command] [param]
  command - the ppu command you wish to execute.
  param   - some commands allow a param for finer control.

Command list:
  spr   - Draws sprites into the internal PPU buffer.  This
          command optionally accepts the background priority
          of the sprites to draw.  0=front 1=back blank=both
  bg    - Draws the background into the internal PPU buffer.
  bgc   - Sets the background color of the internal PPU buffer.
  clear - Clears the internal PPU buffer.
  show  - Forces the PPU to send an update message to the
          attached video screen.

> help regs
Syntax:  regs [reg]
  reg - Optionally supply the register to display the value of.
        Not supplying this parameter will display all regs.
- This will output the current state of all the registers in
  the CPU.  Very similar to the CPU State Viewer output except
  that it's in text.

Supported register names are:
  PC     - Program Counter Register
  SP     - Stack Pointer Register
  ACC    - Accumulator Register
  IX     - X-Index Register
  IY     - Y-Index Register
  PS     - Processor Status Register (as a whole)
  S      - Negative Flag
  V      - Overflow Flag
  B      - Break Command Flag
  D      - Decimal Mode Flag
  I      - Interrupt Disable Flag
  Z      - Zero Flag
  C      - Carry Flag

> help regset
Syntax:  regs [reg] [value]
  reg   - The register to set the value of.
  value - The value the register will be set to, in hex.

Supported register names are:
  PC     - Program Counter Register
  SP     - Stack Pointer Register
  ACC    - Accumulator Register
  IX     - X-Index Register
  IY     - Y-Index Register
  PS     - Processor Status Register (as a whole)
  S      - Negative Flag
  V      - Overflow Flag
  B      - Break Command Flag
  D      - Decimal Mode Flag
  I      - Interrupt Disable Flag
  Z      - Zero Flag
  C      - Carry Flag

> help rom
Syntax:  rom [file]
  file - The path to a *.NES ROM file to load.

> help save
Syntax:  save [file]
  file - The path to a file to which the shell output will
         be saved.

> help sprclear
Syntax:  sprclear
  Clears sprite memory to all zeros.

> help sprget
Syntax:  sprget [value]
  addr  - 1 byte hex position in memory to get the value from.
- Accesses sprite memory.

> help sprset
Syntax:  sprset [addr] [value]
  addr  - 1 byte hex position in memory to set.
  value - 1 byte hex value to set.
- Accesses sprite memory.

> help step
Syntax:  step
  This function executes the next instruction from memory based
  on the current CPU state.  The number of cycles required to
  execute the instruction are automatically granted.

> help test
Syntax:  test [condition]
  condition - This is the comparison to perform.  The result must
              be boolean and a true or false will be displayed.
              The condition is made up of three pieces, and is
              always in the form: [variable] [operator] [value]
  variable  - The variable is some changing part of the system
              that holds a value you want to compare against.
  operator  - The comparison operator to use.  Supported operators
              are:  =, !=, <, >, <=, >=
  value     - Any appropriately sized numeric value, always in hex.

Supported variables are:
  PC     - Program Counter Register
  SP     - Stack Pointer Register
  ACC    - Accumulator Register
  IX     - X-Index Register
  IY     - Y-Index Register
  PS     - Processor Status Register (as a whole)
  S      - Negative Flag
  V      - Overflow Flag
  B      - Break Command Flag
  D      - Decimal Mode Flag
  I      - Interrupt Disable Flag
  Z      - Zero Flag
  C      - Carry Flag
  m:XXXX - Value at address XXXX (hex) in main memory.
  v:XXXX - Value at address XXXX (hex) in video memory.
  s:XX   - Value at address XX (hex) in sprite memory.

> help vidclear
Syntax:  vidclear
  Clears video memory to all zeros.

> help vidget
Syntax:  vidget [value]
  addr  - 2 byte hex position in memory to get the value from.
- Accesses video memory.

> help vidset
Syntax:  vidset [addr] [value]
  addr  - 2 byte hex position in memory to set.
  value - 1 byte hex value to set.
- Accesses video memory.