1
0
mirror of https://github.com/KarolS/millfork.git synced 2025-01-10 20:29:35 +00:00

Formatting update

This commit is contained in:
pmprog 2021-03-24 15:40:50 +00:00
parent db4a5eed00
commit b0e8b5c8d6
2 changed files with 33 additions and 29 deletions

View File

@ -1,40 +1,48 @@
void RasterA() void RasterA() {
{
vic_rasterirq_acknowledge() vic_rasterirq_acknowledge()
vic_border = $00
// First raster split, set border to black
vic_border = black
// Set up next raster split
vic_rasterirq_reconfigure(RasterB.addr, $40) vic_rasterirq_reconfigure(RasterB.addr, $40)
vic_raster_return()
vic_rasterirq_return()
} }
void RasterB() void RasterB() {
{
vic_rasterirq_acknowledge() vic_rasterirq_acknowledge()
vic_border = $04
// Second raster split, Dark grey
vic_border = dark_grey
// Set up next raster split
vic_rasterirq_reconfigure(RasterC.addr, $A0) vic_rasterirq_reconfigure(RasterC.addr, $A0)
vic_raster_return()
vic_rasterirq_return()
} }
void RasterC() void RasterC() {
{
vic_rasterirq_acknowledge() vic_rasterirq_acknowledge()
vic_border = $02
// Third raster split, Light grey
vic_border = light_grey
// Set up next raster split
vic_rasterirq_reconfigure(RasterA.addr, $00) vic_rasterirq_reconfigure(RasterA.addr, $00)
vic_raster_return()
vic_rasterirq_return()
} }
void main() void main() {
{
byte i byte i
// Configure Raster IRQ // Configure Raster IRQ
vic_rasterirq_configure(RasterA.addr, $00) vic_rasterirq_configure(RasterA.addr, $00)
while true // Loop forever
{ while true {
i = 0 i = 0 // Do nothing here
} }
} }

View File

@ -167,8 +167,7 @@ const byte light_grey = 15
const byte light_gray = 15 const byte light_gray = 15
asm void vic_rasterirq_configure(pointer CallbackFunction, byte RasterLine) asm void vic_rasterirq_configure(pointer CallbackFunction, byte RasterLine) {
{
sei sei
ldx CallbackFunction.lo ldx CallbackFunction.lo
stx $0314 stx $0314
@ -187,8 +186,7 @@ asm void vic_rasterirq_configure(pointer CallbackFunction, byte RasterLine)
rts rts
} }
asm void vic_rasterirq_reconfigure(pointer CallbackFunction, byte RasterLine) asm void vic_rasterirq_reconfigure(pointer CallbackFunction, byte RasterLine) {
{
ldx CallbackFunction.lo ldx CallbackFunction.lo
stx $0314 stx $0314
ldy CallbackFunction.hi ldy CallbackFunction.hi
@ -198,14 +196,12 @@ asm void vic_rasterirq_reconfigure(pointer CallbackFunction, byte RasterLine)
rts rts
} }
asm macro void vic_rasterirq_acknowledge() asm macro void vic_rasterirq_acknowledge() {
{
lda #$FF lda #$FF
sta $D019 sta $D019
} }
asm macro void vic_raster_return() asm macro void vic_rasterirq_return() {
{
lda #$00 lda #$00
jmp $EA81 jmp $EA81
} }