diff --git a/wip-hugo/STARTUP.s b/wip-hugo/STARTUP.s index f4d5112..1f28445 100755 --- a/wip-hugo/STARTUP.s +++ b/wip-hugo/STARTUP.s @@ -1,23 +1,17 @@ - - -;Settings positions - +;;Settings positions CR1 = $d011; ;Grafic settings VIC_bank_settings = $DD00 ; Vic position Screen_RAM_settings =$D018 ;Screan ram position relative to vic +;;########## VIC_BANK ################ +;;# BITMAP | $4000 -$5F3F +;;# Unused? | $5F3F - $6000 +;;# SCREAN RAM (color) | $6000 -$63E7 +;;# Unused? | $63E8 - $7FFF +;;# +;;#################################### - -;########## VIC_BANK ################ -;# BITMAP | $4000 -$5F3F -;# Unused? | $5F3F - $6000 -;# SCREAN RAM (color) | $6000 -$63E7 -;# Unused? | $63E8 - $7FFF -;# -;#################################### - -;Memory positions - +;;Memory positions VIC_bank = $4000 VIC_bank_end = VIC_bank + $3FFF @@ -27,14 +21,11 @@ Bitmap_end = $5F3F Screen_RAM = $2000 + VIC_bank Screen_RAM_end = Screen_RAM + $03E7 -;Free upp memory -;https://www.c64-wiki.com/wiki/Bank_Switching -; -; - - -;Sets grafic mode [Standard bitmap mode] -;https://www.c64-wiki.com/wiki/Standard_Bitmap_Mode +;;Free upp memory +;;https://www.c64-wiki.com/wiki/Bank_Switching +;; +;;Sets grafic mode [Standard bitmap mode] +;;https://www.c64-wiki.com/wiki/Standard_Bitmap_Mode LDA #%10111111 ; ECM = False AND CR1 STA CR1 @@ -43,9 +34,8 @@ LDA #%00100000; BMM = True ORA CR1 STA CR1 - -; Set VIC bank to bank 1 -;https://www.c64-wiki.com/wiki/VIC_bank +;;Set VIC bank to bank 1 +;;https://www.c64-wiki.com/wiki/VIC_bank LDA #%11111110 ;bit_0 = False AND VIC_bank_settings STA VIC_bank_settings @@ -54,7 +44,7 @@ LDA #%00000010; bit_1 = True ORA VIC_bank_settings STA VIC_bank_settings -;Set Scren-RAM to offset 8 ;https://www.c64-wiki.com/wiki/53272 (offset is 8k byte = 1024*8-ich) +;;Set Scren-RAM to offset 8 ;https://www.c64-wiki.com/wiki/53272 (offset is 8k byte = 1024*8-ich) LDA #%10001111 ; bit_6 =bit_5=bit_4 = Falsw AND Screen_RAM_settings STA Screen_RAM_settings @@ -64,8 +54,7 @@ ORA Screen_RAM_settings STA Screen_RAM_settings -;Paint the bitmap black. More bitmap: https://www.c64-wiki.com/wiki/53272, https://www.c64-wiki.com/wiki/Screen_RAM#Moving_of_screen_RAM - +;;Paint the bitmap black. More bitmap: https://www.c64-wiki.com/wiki/53272, https://www.c64-wiki.com/wiki/Screen_RAM#Moving_of_screen_RAM LDA #>VIC_bank STA $FC LDA #Screen_RAM STA $FC LDA # X - ; + - ; + - ;\/ - ; Y - ; - ; Let be this position in memory be stored in [$49, $4A] temporaraly - - - ; pos = x_offset + ;;FIND THE POSITION IN MEMORY TO WRITE PIXEL + ;; + + + + + > X + ;; + + ;; + + ;;\/ + ;; Y + ;; + ;; Let be this position in memory be stored in [$49, $4A] temporaraly + ;;pos = x_offset LDA #%11111000 AND $FC STA $49 @@ -39,35 +35,33 @@ LDA $FD STA $4A - ; y_offset because chuncks aka y_offset_bc + ;;y_offset because chuncks aka y_offset_bc LDA #%00000111 ; A = y (mod 8) AND $FB - ; pos += y_offset_bc - CLC + ;;pos += y_offset_bc + CLC ADC $49 STA $49 LDA #$00 ADC $4A STA $4A - LDY $FB LDA #$00 STA $4B - ; y =8 translates to 320 bytes. + ;;y =8 translates to 320 bytes. LDA #%11111000 ; A = y - [y (mod 8)] AND $FB STA $FB - - ;We need to A = A*40 =A * 2^3 * 5 - ; A = A*2^3 + ;;We need to A = A*40 =A * 2^3 * 5 + ;;A = A*2^3 mult_16 $FB, $4B mult_16 $FB, $4B mult_16 $FB, $4B - ; *5 + ;;*5 Add_16 $49, $4A, $FB, $4B Add_16 $49, $4A, $FB, $4B Add_16 $49, $4A, $FB, $4B @@ -76,15 +70,13 @@ STY $FB - ;; add offset for where bitmap is + ;;add offset for where bitmap is Add_16 $49, $4A, #Bitmap - ;;Let draw some stuff LDX #$00 - LDA $FE + LDA $FE ORA ($49, X) STA ($49, X) - RTS - .endproc \ No newline at end of file + .endproc diff --git a/wip-hugo/source.s b/wip-hugo/source.s index fea7685..0434167 100755 --- a/wip-hugo/source.s +++ b/wip-hugo/source.s @@ -1,13 +1,9 @@ .include "STARTUP.s" .include "macros/16aritmatic.s" - - -.include "routines/memory/line_up.s" +.include "routines/memory/line_down.s" loop_: jmp loop_ .include "routines/memory/memory_rec.s" .include "routines/memory/pixel_draw.s" - -;.include "routines/memory/memory.s"