From 9b6fd57100f8e34262bce49c161380c5e3582c9a Mon Sep 17 00:00:00 2001 From: gimulnautti Date: Fri, 24 Feb 2023 16:52:13 +0200 Subject: [PATCH] =?UTF-8?q?Korjattu=20bugi=20main=20task=20workloading=20k?= =?UTF-8?q?=C3=A4ytt=C3=A4ess=C3=A4=20samaa=20temp=20pointeria=20kuin=20ra?= =?UTF-8?q?sterikeskeytys?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PiraattiIntro.trse | 10 +++++----- piraatti_intro.ras | 37 ++++--------------------------------- 2 files changed, 9 insertions(+), 38 deletions(-) diff --git a/PiraattiIntro.trse b/PiraattiIntro.trse index 8bbd680..d2b2f18 100644 --- a/PiraattiIntro.trse +++ b/PiraattiIntro.trse @@ -1,6 +1,6 @@ -zeropages = ,$02, $04, $08, $16, $0B, $0D, $10, $12, $22, $24, $68, $45 -temp_zeropages = ,$54, $56, $58, $5A -zeropages_userdefined = ,$5e, $5f, $60, $61, $62, $63 +zeropages = ,$02, $04, $08, $16, $0B, $0D, $10, $12, $22, $24, $68, $45 +temp_zeropages = ,$54, $56, $58, $5A +zeropages_userdefined = ,$5e, $5f, $60, $61, $62, $63 zeropage_screenmemory = $fe zeropage_decrunch1 = $47 zeropage_decrunch2 = $48 @@ -29,7 +29,7 @@ override_target_settings_org = $810 override_target_settings_ignore_sys = 0 override_target_settings_ignore_prg = 0 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/ zeropage_colormemory = $fb dirart_flf_file = none @@ -38,7 +38,7 @@ show_all_files = 1 use_vice_c1541 = 0 remove_unused_symbols = 1 ignore_initial_jump = 0 -current_file = piraatti_intro.asm +current_file = piraatti_intro.ras output_type = prg exomizer_toggle = 0 use_track_19 = 1 diff --git a/piraatti_intro.ras b/piraatti_intro.ras index ae26d8a..4b24107 100644 --- a/piraatti_intro.ras +++ b/piraatti_intro.ras @@ -422,36 +422,6 @@ begin mainWorkState := s; 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) * Triple each bit in char both vertical and horizontal @@ -471,14 +441,15 @@ var begin while (char > 64) do char -= 64; - tempPtr1 := charsetptr + char * 8; +// tempPtr1 := charsetptr + char * 8; + charsetptr += char * 8; for k:=0 to 8 do begin temp[0] := 0; temp[1] := 0; temp[2] := 0; for i:=0 to 10 do begin - charTemp := tempPtr1[0] & chrBitMask[sprChrBit[i]]; + charTemp := charsetptr[0] & chrBitMask[sprChrBit[i]]; sprOfsTemp := sprOffset[i]; if charTemp then temp[sprOfsTemp] := temp[sprOfsTemp] | sprBitMask[i]; end; @@ -488,7 +459,7 @@ begin sPtr[2] := temp[2]; sPtr += 3; end; - tempPtr1 += 1; + charsetptr += 1; end; end;