1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-09-30 09:57:11 +00:00

Fixed CIA problems.

This commit is contained in:
jespergravgaard 2020-04-27 00:20:53 +02:00
parent b10c365513
commit a8384bbebe
11 changed files with 24 additions and 24 deletions

View File

@ -35,7 +35,7 @@ void main() {
*PROCPORT_DDR = PROCPORT_DDR_MEMORY_MASK;
*PROCPORT = PROCPORT_RAM_IO;
// Disable CIA 1 Timer IRQ
CIA1->INTERRUPT = CIA_INTERRUPT_CLEAR;
*CIA1_INTERRUPT = CIA_INTERRUPT_CLEAR;
// Set raster line to $100
*VIC_CONTROL |=$80;
*RASTER = $00;

View File

@ -35,7 +35,7 @@ void main() {
*PROCPORT_DDR = PROCPORT_DDR_MEMORY_MASK;
*PROCPORT = PROCPORT_RAM_IO;
// Disable CIA 1 Timer IRQ
CIA1->INTERRUPT = CIA_INTERRUPT_CLEAR;
*CIA1_INTERRUPT = CIA_INTERRUPT_CLEAR;
// Set raster line to $100
*VIC_CONTROL |=$80;
*RASTER = $00;

View File

@ -35,7 +35,7 @@ void main() {
*PROCPORT_DDR = PROCPORT_DDR_MEMORY_MASK;
*PROCPORT = PROCPORT_RAM_IO;
// Disable CIA 1 Timer IRQ
CIA1->INTERRUPT = CIA_INTERRUPT_CLEAR;
*CIA1_INTERRUPT = CIA_INTERRUPT_CLEAR;
// Set raster line to $100
*VIC_CONTROL |=$80;
*RASTER = $00;

View File

@ -19,7 +19,7 @@ const byte CIA_INTERRUPT_CLEAR = $7f;
void main() {
asm { sei }
// Disable CIA 1 Timer IRQ
CIA1->INTERRUPT = CIA_INTERRUPT_CLEAR;
*CIA1_INTERRUPT = CIA_INTERRUPT_CLEAR;
// Set raster line to $100
*VIC_CONTROL |=$80;
*RASTER = $00;

View File

@ -16,7 +16,7 @@ const byte CIA_INTERRUPT_CLEAR = $7f;
void main() {
asm { sei }
// Disable CIA 1 Timer IRQ
CIA1->INTERRUPT = CIA_INTERRUPT_CLEAR;
*CIA1_INTERRUPT = CIA_INTERRUPT_CLEAR;
// Set raster line to $0fd
*VIC_CONTROL &=$7f;
*RASTER = $fd;

View File

@ -19,7 +19,7 @@ const byte CIA_INTERRUPT_CLEAR = $7f;
void main() {
asm { sei }
// Disable CIA 1 Timer IRQ
CIA1->INTERRUPT = CIA_INTERRUPT_CLEAR;
*CIA1_INTERRUPT = CIA_INTERRUPT_CLEAR;
// Set raster line to $100
*VIC_CONTROL |=$80;
*RASTER = $00;

View File

@ -16,7 +16,7 @@ const byte CIA_INTERRUPT_CLEAR = $7f;
void main() {
asm { sei }
// Disable CIA 1 Timer IRQ
CIA1->INTERRUPT = CIA_INTERRUPT_CLEAR;
*CIA1_INTERRUPT = CIA_INTERRUPT_CLEAR;
// Set raster line to $0fd
*VIC_CONTROL &=$7f;
*RASTER = $fd;

View File

@ -4,6 +4,8 @@
.pc = $80d "Program"
// The CIA#2: Serial bus, RS-232, VIC memory bank
.label CIA2 = $dd00
// CIA#2 timer A&B as one single 32-bit value
.label CIA2_TIMER_AB = $dd04
// Timer Control - Start/stop timer (0:stop, 1: start)
.const CIA_TIMER_CONTROL_START = 1
// Timer B Control - Timer counts (00:system cycles, 01: CNT pulses, 10: timer A underflow, 11: time A underflow while CNT is high)
@ -11,8 +13,6 @@
// Clock cycles used to start & read the cycle clock by calling clock_start() and clock() once. Can be subtracted when calculating the number of cycles used by a routine.
// To make precise cycle measurements interrupts and the display must be disabled so neither steals any cycles from the code.
.const CLOCKS_PER_INIT = $12
// CIA#2 timer A&B as one single 32-bit value
.label CIA2_TIMER_AB = $dd04
.label SCREEN = $400
.const OFFSET_STRUCT_MOS6526_CIA_TIMER_A_CONTROL = $e
.const OFFSET_STRUCT_MOS6526_CIA_TIMER_B_CONTROL = $f

View File

@ -616,6 +616,8 @@ Target platform is c64basic / MOS6502X
// Global Constants & labels
// The CIA#2: Serial bus, RS-232, VIC memory bank
.label CIA2 = $dd00
// CIA#2 timer A&B as one single 32-bit value
.label CIA2_TIMER_AB = $dd04
// Timer Control - Start/stop timer (0:stop, 1: start)
.const CIA_TIMER_CONTROL_START = 1
// Timer B Control - Timer counts (00:system cycles, 01: CNT pulses, 10: timer A underflow, 11: time A underflow while CNT is high)
@ -623,8 +625,6 @@ Target platform is c64basic / MOS6502X
// Clock cycles used to start & read the cycle clock by calling clock_start() and clock() once. Can be subtracted when calculating the number of cycles used by a routine.
// To make precise cycle measurements interrupts and the display must be disabled so neither steals any cycles from the code.
.const CLOCKS_PER_INIT = $12
// CIA#2 timer A&B as one single 32-bit value
.label CIA2_TIMER_AB = $dd04
.label SCREEN = $400
.const OFFSET_STRUCT_MOS6526_CIA_TIMER_A_CONTROL = $e
.const OFFSET_STRUCT_MOS6526_CIA_TIMER_B_CONTROL = $f
@ -1041,6 +1041,8 @@ ASSEMBLER BEFORE OPTIMIZATION
// Global Constants & labels
// The CIA#2: Serial bus, RS-232, VIC memory bank
.label CIA2 = $dd00
// CIA#2 timer A&B as one single 32-bit value
.label CIA2_TIMER_AB = $dd04
// Timer Control - Start/stop timer (0:stop, 1: start)
.const CIA_TIMER_CONTROL_START = 1
// Timer B Control - Timer counts (00:system cycles, 01: CNT pulses, 10: timer A underflow, 11: time A underflow while CNT is high)
@ -1048,8 +1050,6 @@ ASSEMBLER BEFORE OPTIMIZATION
// Clock cycles used to start & read the cycle clock by calling clock_start() and clock() once. Can be subtracted when calculating the number of cycles used by a routine.
// To make precise cycle measurements interrupts and the display must be disabled so neither steals any cycles from the code.
.const CLOCKS_PER_INIT = $12
// CIA#2 timer A&B as one single 32-bit value
.label CIA2_TIMER_AB = $dd04
.label SCREEN = $400
.const OFFSET_STRUCT_MOS6526_CIA_TIMER_A_CONTROL = $e
.const OFFSET_STRUCT_MOS6526_CIA_TIMER_B_CONTROL = $f
@ -1486,6 +1486,8 @@ Score: 869
// Global Constants & labels
// The CIA#2: Serial bus, RS-232, VIC memory bank
.label CIA2 = $dd00
// CIA#2 timer A&B as one single 32-bit value
.label CIA2_TIMER_AB = $dd04
// Timer Control - Start/stop timer (0:stop, 1: start)
.const CIA_TIMER_CONTROL_START = 1
// Timer B Control - Timer counts (00:system cycles, 01: CNT pulses, 10: timer A underflow, 11: time A underflow while CNT is high)
@ -1493,8 +1495,6 @@ Score: 869
// Clock cycles used to start & read the cycle clock by calling clock_start() and clock() once. Can be subtracted when calculating the number of cycles used by a routine.
// To make precise cycle measurements interrupts and the display must be disabled so neither steals any cycles from the code.
.const CLOCKS_PER_INIT = $12
// CIA#2 timer A&B as one single 32-bit value
.label CIA2_TIMER_AB = $dd04
.label SCREEN = $400
.const OFFSET_STRUCT_MOS6526_CIA_TIMER_A_CONTROL = $e
.const OFFSET_STRUCT_MOS6526_CIA_TIMER_B_CONTROL = $f

View File

@ -11,6 +11,8 @@
.label SPRITES_COLS = $d027
// The CIA#2: Serial bus, RS-232, VIC memory bank
.label CIA2 = $dd00
// CIA#2 timer A&B as one single 32-bit value
.label CIA2_TIMER_AB = $dd04
// Timer Control - Start/stop timer (0:stop, 1: start)
.const CIA_TIMER_CONTROL_START = 1
// Timer B Control - Timer counts (00:system cycles, 01: CNT pulses, 10: timer A underflow, 11: time A underflow while CNT is high)
@ -20,8 +22,6 @@
// Clock cycles used to start & read the cycle clock by calling clock_start() and clock() once. Can be subtracted when calculating the number of cycles used by a routine.
// To make precise cycle measurements interrupts and the display must be disabled so neither steals any cycles from the code.
.const CLOCKS_PER_INIT = $12
// CIA#2 timer A&B as one single 32-bit value
.label CIA2_TIMER_AB = $dd04
.const OFFSET_STRUCT_MOS6526_CIA_TIMER_A_CONTROL = $e
.const OFFSET_STRUCT_MOS6526_CIA_TIMER_B_CONTROL = $f
.label SCREEN = $400

View File

@ -1135,11 +1135,11 @@ Simplifying constant pointer cast (byte*) 53269
Simplifying constant pointer cast (byte*) 53280
Simplifying constant pointer cast (byte*) 53287
Simplifying constant pointer cast (struct MOS6526_CIA*) 56576
Simplifying constant pointer cast (dword*) 56580
Simplifying constant pointer cast (byte*) 253
Simplifying constant pointer cast (byte*) 254
Simplifying constant pointer cast (byte*) 255
Simplifying constant pointer cast (signed byte*) 253
Simplifying constant pointer cast (dword*) 56580
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast $40
Simplifying constant pointer cast (byte*) 12288
@ -2265,6 +2265,8 @@ Target platform is c64basic / MOS6502X
.label SPRITES_COLS = $d027
// The CIA#2: Serial bus, RS-232, VIC memory bank
.label CIA2 = $dd00
// CIA#2 timer A&B as one single 32-bit value
.label CIA2_TIMER_AB = $dd04
// Timer Control - Start/stop timer (0:stop, 1: start)
.const CIA_TIMER_CONTROL_START = 1
// Timer B Control - Timer counts (00:system cycles, 01: CNT pulses, 10: timer A underflow, 11: time A underflow while CNT is high)
@ -2274,8 +2276,6 @@ Target platform is c64basic / MOS6502X
// Clock cycles used to start & read the cycle clock by calling clock_start() and clock() once. Can be subtracted when calculating the number of cycles used by a routine.
// To make precise cycle measurements interrupts and the display must be disabled so neither steals any cycles from the code.
.const CLOCKS_PER_INIT = $12
// CIA#2 timer A&B as one single 32-bit value
.label CIA2_TIMER_AB = $dd04
.const OFFSET_STRUCT_MOS6526_CIA_TIMER_A_CONTROL = $e
.const OFFSET_STRUCT_MOS6526_CIA_TIMER_B_CONTROL = $f
.label SCREEN = $400
@ -3732,6 +3732,8 @@ ASSEMBLER BEFORE OPTIMIZATION
.label SPRITES_COLS = $d027
// The CIA#2: Serial bus, RS-232, VIC memory bank
.label CIA2 = $dd00
// CIA#2 timer A&B as one single 32-bit value
.label CIA2_TIMER_AB = $dd04
// Timer Control - Start/stop timer (0:stop, 1: start)
.const CIA_TIMER_CONTROL_START = 1
// Timer B Control - Timer counts (00:system cycles, 01: CNT pulses, 10: timer A underflow, 11: time A underflow while CNT is high)
@ -3741,8 +3743,6 @@ ASSEMBLER BEFORE OPTIMIZATION
// Clock cycles used to start & read the cycle clock by calling clock_start() and clock() once. Can be subtracted when calculating the number of cycles used by a routine.
// To make precise cycle measurements interrupts and the display must be disabled so neither steals any cycles from the code.
.const CLOCKS_PER_INIT = $12
// CIA#2 timer A&B as one single 32-bit value
.label CIA2_TIMER_AB = $dd04
.const OFFSET_STRUCT_MOS6526_CIA_TIMER_A_CONTROL = $e
.const OFFSET_STRUCT_MOS6526_CIA_TIMER_B_CONTROL = $f
.label SCREEN = $400
@ -5146,6 +5146,8 @@ Score: 30994
.label SPRITES_COLS = $d027
// The CIA#2: Serial bus, RS-232, VIC memory bank
.label CIA2 = $dd00
// CIA#2 timer A&B as one single 32-bit value
.label CIA2_TIMER_AB = $dd04
// Timer Control - Start/stop timer (0:stop, 1: start)
.const CIA_TIMER_CONTROL_START = 1
// Timer B Control - Timer counts (00:system cycles, 01: CNT pulses, 10: timer A underflow, 11: time A underflow while CNT is high)
@ -5155,8 +5157,6 @@ Score: 30994
// Clock cycles used to start & read the cycle clock by calling clock_start() and clock() once. Can be subtracted when calculating the number of cycles used by a routine.
// To make precise cycle measurements interrupts and the display must be disabled so neither steals any cycles from the code.
.const CLOCKS_PER_INIT = $12
// CIA#2 timer A&B as one single 32-bit value
.label CIA2_TIMER_AB = $dd04
.const OFFSET_STRUCT_MOS6526_CIA_TIMER_A_CONTROL = $e
.const OFFSET_STRUCT_MOS6526_CIA_TIMER_B_CONTROL = $f
.label SCREEN = $400