https://github.com/koute/phantom2c02
PhantomJS wrapper of Visual2c02
https://github.com/koute/phantom2c02
Last synced: 8 months ago
JSON representation
PhantomJS wrapper of Visual2c02
- Host: GitHub
- URL: https://github.com/koute/phantom2c02
- Owner: koute
- License: mit
- Created: 2015-07-12T18:29:45.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2023-09-30T09:18:13.000Z (over 2 years ago)
- Last Synced: 2025-06-11T21:13:13.701Z (12 months ago)
- Language: JavaScript
- Size: 1.69 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# What is this?
[Visual2C02](http://www.qmtpro.com/~nes/chipimages/visual2c02/) wrapped in a convenient API
to allow easy and fully automated simulation through [PhantomJS](http://phantomjs.org/).
# Usage
`OPENSSL_CONF=/etc/ssl phantomjs example01.js`
# API reference
### Toplevel
##### `create()` -> `Context`
##### `ppumask( [value] )` -> `{...}`
##### `ppuctrl( [value] )` -> `{...}`
### Context
##### `.step_pixel()`
##### `.step_scanline()`
##### `.reset()`
##### `.read_oam( offset )` -> `u8`
##### `.write_oam( offset, value )`
##### `.read_secondary_oam( offset )` -> `u8`
##### `.write_secondary_oam( offset, value )`
##### `.read_palette_ram( offset )` -> `u8`
##### `.write_palette_ram( offset, value )`
##### `.read_vram( address )` -> `u8`
##### `.write_vram( address, value )`
##### `.read_bits( node_name )` -> `Number`
##### `.dump_oam()` -> `[256]`
##### `.dump_secondary_oam()` -> `[32]`
##### `.dump_palette_ram()` -> `[32]`
##### `.dump_vram()` -> `[16384]`
##### `.get_scanline()` -> `Number`
##### `.get_dot()` -> `Number`
##### `.get_address_bus()` -> `u16`
##### `.get_data_bus()` -> `u8`
##### `.get_current_address()` -> `u16`
##### `.get_temporary_address()` -> `u16`
##### `.is_reading_from_vram()` -> `bool`
##### `.is_writing_to_vram()` -> `bool`
##### `.queue_cpu_read( address, [callback] )`
##### `.queue_cpu_write( address, value )`
##### `.exit()`
##### `.screenshot( filename )`