![]() |
c128lib Base
Base macros for C128
|
Cia module. More...
Functions | |
macro | c128lib_GetFirePressedPort1 () |
Checks if the fire button is pressed on joystick port 1. | |
macro | c128lib_GetFirePressedPort2 () |
Checks if the fire button is pressed on joystick port 2. | |
macro | c128lib_DisableCIAInterrupts () |
Disables the interrupts from both CIA chips. | |
macro | c128lib_SetVicBank (bank) |
Configures Vic bank (16K) which is directly addressable by VIC2 chip. | |
Cia module.
Simple macros for Cia.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
macro c128lib_GetFirePressedPort1 | ( | ) |
Checks if the fire button is pressed on joystick port 1.
This macro checks if the fire button is pressed on joystick port 1. It loads the data from CIA1's data port B into the accumulator and then performs a bitwise AND operation with the JOY_FIRE constant.;
macro c128lib_GetFirePressedPort2 | ( | ) |
Checks if the fire button is pressed on joystick port 2.
This macro checks if the fire button is pressed on joystick port 2. It loads the data from CIA1's data port A into the accumulator and then performs a bitwise AND operation with the JOY_FIRE constant.;
macro c128lib_DisableCIAInterrupts | ( | ) |
Disables the interrupts from both CIA chips.
This macro disables the interrupts from both CIA chips on a Commodore 64. It loads the accumulator with the value $7F, which disables all interrupt sources, and then stores this value in the IRQ control registers of both CIA chips. It then reads the IRQ control registers to confirm the changes.
macro c128lib_SetVicBank | ( | bank | ) |
Configures Vic bank (16K) which is directly addressable by VIC2 chip.
[in] | bank | Bank to set |