mirror of
https://gitlab.com/camelot/kickc.git
synced 2025-01-11 04:29:53 +00:00
Fixed off-by-one problem in multiplexer. Improved mega65 conio.
This commit is contained in:
parent
7a8a42bb03
commit
9b5d3f8190
@ -1,6 +1,7 @@
|
|||||||
// MEGA65 conio.h implementation
|
// MEGA65 conio.h implementation
|
||||||
#include <conio.h>
|
#include <conio.h>
|
||||||
#include <mega65.h>
|
#include <mega65.h>
|
||||||
|
#include <6502.h>
|
||||||
|
|
||||||
// The screen width
|
// The screen width
|
||||||
#ifdef __MEGA65_C64__
|
#ifdef __MEGA65_C64__
|
||||||
@ -27,18 +28,9 @@ const char CONIO_TEXTCOLOR_DEFAULT = LIGHT_BLUE;
|
|||||||
// Enable 2K Color ROM
|
// Enable 2K Color ROM
|
||||||
void conio_mega65_init() {
|
void conio_mega65_init() {
|
||||||
// Disable BASIC/KERNAL interrupts
|
// Disable BASIC/KERNAL interrupts
|
||||||
asm {
|
SEI();
|
||||||
sei
|
|
||||||
}
|
|
||||||
// Map memory to BANK 0 : 0x00XXXX - giving access to I/O
|
// Map memory to BANK 0 : 0x00XXXX - giving access to I/O
|
||||||
asm {
|
memoryRemap(0,0,0);
|
||||||
lda #0
|
|
||||||
tax
|
|
||||||
tay
|
|
||||||
taz
|
|
||||||
map
|
|
||||||
eom
|
|
||||||
}
|
|
||||||
// Enable the VIC 4
|
// Enable the VIC 4
|
||||||
*IO_KEY = 0x47;
|
*IO_KEY = 0x47;
|
||||||
*IO_KEY = 0x53;
|
*IO_KEY = 0x53;
|
||||||
|
@ -136,6 +136,6 @@ inline char plexFreeNextYpos() {
|
|||||||
|
|
||||||
// Update the data structure to reflect that a sprite has been shown. This sprite will be free again after 21 lines.
|
// Update the data structure to reflect that a sprite has been shown. This sprite will be free again after 21 lines.
|
||||||
inline void plexFreeAdd(char ypos) {
|
inline void plexFreeAdd(char ypos) {
|
||||||
PLEX_FREE_YPOS[plex_free_next] = ypos+21;
|
PLEX_FREE_YPOS[plex_free_next] = ypos+22;
|
||||||
plex_free_next = (plex_free_next+1)&7;
|
plex_free_next = (plex_free_next+1)&7;
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user