1
0
mirror of https://github.com/KarolS/millfork.git synced 2024-12-22 16:31:02 +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()
{
vic_rasterirq_acknowledge()
vic_border = $00
void RasterA() {
vic_rasterirq_acknowledge()
// First raster split, set border to black
vic_border = black
// Set up next raster split
vic_rasterirq_reconfigure(RasterB.addr, $40)
vic_raster_return()
vic_rasterirq_return()
}
void RasterB()
{
vic_rasterirq_acknowledge()
vic_border = $04
void RasterB() {
vic_rasterirq_acknowledge()
// Second raster split, Dark grey
vic_border = dark_grey
// Set up next raster split
vic_rasterirq_reconfigure(RasterC.addr, $A0)
vic_raster_return()
vic_rasterirq_return()
}
void RasterC()
{
vic_rasterirq_acknowledge()
vic_border = $02
void RasterC() {
vic_rasterirq_acknowledge()
// Third raster split, Light grey
vic_border = light_grey
// Set up next raster split
vic_rasterirq_reconfigure(RasterA.addr, $00)
vic_raster_return()
vic_rasterirq_return()
}
void main()
{
void main() {
byte i
// Configure Raster IRQ
vic_rasterirq_configure(RasterA.addr, $00)
while true
{
i = 0
}
// Loop forever
while true {
i = 0 // Do nothing here
}
}

View File

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