Korjattu bugi main task workloading käyttäessä samaa temp pointeria kuin rasterikeskeytys

This commit is contained in:
gimulnautti 2023-02-24 16:52:13 +02:00
parent cef15740c0
commit 9b6fd57100
2 changed files with 9 additions and 38 deletions

View File

@ -29,7 +29,7 @@ override_target_settings_org = $810
override_target_settings_ignore_sys = 0 override_target_settings_ignore_sys = 0
override_target_settings_ignore_prg = 0 override_target_settings_ignore_prg = 0
output_debug_symbols = 1 output_debug_symbols = 1
open_files = ,resources/images/piraattinaamat-2.flf, resources/images/piraattinaamat-1.flf, piraatti_intro.ras open_files = ,piraatti_intro.asm, resources/images/piraattinaamat-2.flf, resources/images/piraattinaamat-1.flf, piraatti_intro.ras
project_path = /Users/gimulnautti/piraattipuolue-github/c64-vaali-intro-2023/ project_path = /Users/gimulnautti/piraattipuolue-github/c64-vaali-intro-2023/
zeropage_colormemory = $fb zeropage_colormemory = $fb
dirart_flf_file = none dirart_flf_file = none
@ -38,7 +38,7 @@ show_all_files = 1
use_vice_c1541 = 0 use_vice_c1541 = 0
remove_unused_symbols = 1 remove_unused_symbols = 1
ignore_initial_jump = 0 ignore_initial_jump = 0
current_file = piraatti_intro.asm current_file = piraatti_intro.ras
output_type = prg output_type = prg
exomizer_toggle = 0 exomizer_toggle = 0
use_track_19 = 1 use_track_19 = 1

View File

@ -422,36 +422,6 @@ begin
mainWorkState := s; mainWorkState := s;
end; end;
/**
* Assembly setup for a character set copy in RAM
*/
procedure CopyCharsetRomToRam(targetHi : byte);
begin
asm("
ldx #$08 ; we loop 8 times (8x255 = 2Kb)
lda #$33 ; make the CPU see the Character Generator ROM...
sta $01 ; ...at $D000 by storing %00110011 into location $01
lda #$d0 ; load high byte of $D000
sta $fc ; store it in a free location we use as vector
ldy #$00 ; init counter with 0
sty $fb ; store it as low byte in the $FB/$FC vector
lda $fd ; second pair in $FD/$FE
lda targetHi ; point to target
sta $fe
loopc lda ($fb),y ; read byte from vector stored in $fb/$fc
sta ($fd),y ; write to the RAM
iny ; do this 255 times...
bne loopc ; ..for low byte $00 to $FF
inc $fc ; when we passed $FF increase high byte...
inc $fe
dex ; ... and decrease X by one before restart
bne loopc ; We repeat this until X becomes Zero
lda #$37 ; switch in I/O mapped registers again...
sta $01 ; ... with %00110111 so CPU can see them
");
end;
/** /**
* Print character set char to sprite data (hires) * Print character set char to sprite data (hires)
* Triple each bit in char both vertical and horizontal * Triple each bit in char both vertical and horizontal
@ -471,14 +441,15 @@ var
begin begin
while (char > 64) do char -= 64; while (char > 64) do char -= 64;
tempPtr1 := charsetptr + char * 8; // tempPtr1 := charsetptr + char * 8;
charsetptr += char * 8;
for k:=0 to 8 do begin for k:=0 to 8 do begin
temp[0] := 0; temp[0] := 0;
temp[1] := 0; temp[1] := 0;
temp[2] := 0; temp[2] := 0;
for i:=0 to 10 do begin for i:=0 to 10 do begin
charTemp := tempPtr1[0] & chrBitMask[sprChrBit[i]]; charTemp := charsetptr[0] & chrBitMask[sprChrBit[i]];
sprOfsTemp := sprOffset[i]; sprOfsTemp := sprOffset[i];
if charTemp then temp[sprOfsTemp] := temp[sprOfsTemp] | sprBitMask[i]; if charTemp then temp[sprOfsTemp] := temp[sprOfsTemp] | sprBitMask[i];
end; end;
@ -488,7 +459,7 @@ begin
sPtr[2] := temp[2]; sPtr[2] := temp[2];
sPtr += 3; sPtr += 3;
end; end;
tempPtr1 += 1; charsetptr += 1;
end; end;
end; end;