mirror of
https://github.com/KarolS/millfork.git
synced 2026-04-22 00:17:03 +00:00
Library improvements
This commit is contained in:
+50
-3
@@ -2,13 +2,13 @@
|
||||
|
||||
# NES/Famicom-oriented modules
|
||||
|
||||
## `nes_hardware` module
|
||||
## nes_hardware
|
||||
|
||||
The `nes_hardware` module is imported automatically on NES targets.
|
||||
|
||||
TODO
|
||||
|
||||
## `nes_mmc4` module
|
||||
## nes_mmc4
|
||||
|
||||
The `nes_mmc4` module is imported automatically on the NES MMC4 target.
|
||||
and contains routines related to MMC4 bankswitching.
|
||||
@@ -37,4 +37,51 @@ Switches nametable mirroring to vertical.
|
||||
|
||||
#### `void set_horizontal_mirroring()`
|
||||
|
||||
Switches nametable mirroring to horizontal.
|
||||
Switches nametable mirroring to horizontal.
|
||||
|
||||
## nes_joy
|
||||
|
||||
Provides an interface for reading joypads that is compatible with the `joy` module.
|
||||
|
||||
#### `alias input_a = input_btn`
|
||||
|
||||
1 if A button pressed, 0 id not pressed.
|
||||
|
||||
#### `byte input_b`
|
||||
|
||||
1 if B button pressed, 0 id not pressed.
|
||||
|
||||
#### `byte input_select`
|
||||
|
||||
1 if Select button pressed, 0 id not pressed.
|
||||
|
||||
#### `byte input_start`
|
||||
|
||||
1 if Start button pressed, 0 id not pressed.
|
||||
|
||||
#### `void read_joy1()`
|
||||
|
||||
Reads the joypad from the port 1.
|
||||
|
||||
#### `void read_joy2()`
|
||||
|
||||
Reads the joypad from the port 2.
|
||||
|
||||
#### `void read_also_joy1()`
|
||||
|
||||
Reads the joypad from the port 1 and adds its readouts to the current readouts.
|
||||
|
||||
#### `void read_also_joy2()`
|
||||
|
||||
Reads the joypad from the port 2 and adds its readouts to the current readouts.
|
||||
|
||||
#### `void nes_reset_joy()`
|
||||
|
||||
Resets the state variables.
|
||||
Unlike `reset_joy`, this resets all the NES button states.
|
||||
|
||||
## nes_joy1_default
|
||||
|
||||
Defines the joystick in port 1 as the default joystick.
|
||||
|
||||
#### `alias read_joy = read_joy1`
|
||||
|
||||
Reference in New Issue
Block a user