-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDoTC_Screen.asm
161 lines (155 loc) · 2.62 KB
/
DoTC_Screen.asm
1
; ------------------------------------------------------------------------------; from SCR.ASM; ---------------------------; hl -> screen filename to load; de -> memory addressscr_load:; --------------------------- SET_ACTIVE_MEMORY_BANK MEMORY_BANK2 call readfile SET_ACTIVE_MEMORY_BANK MEMORY_BANK0 ret; ---------------------------; hl -> screen filename to loadscr_load_decomp:; --------------------------- ld de,MEMORY_BANK2_ADR; ld de,BUFIMA call scr_load call blackout ld hl,MEMORY_BANK2_ADR+16+2; +2 = skip file length; ld hl,BUFIMA+16+2 ; +2 = skip file length; ---------------------------decomp:; hl -> compressed data start; --------------------------- SET_ACTIVE_MEMORY_BANK MEMORY_BANK2 ld de,SCREEN_ADDRESS push ix push iy call deexo pop iy pop ix SET_ACTIVE_MEMORY_BANK MEMORY_BANK0 ret read "..\include\exomizer.asm"; ---------------------------setflash:; --------------------------- ld a,&0a ld (flash_color_wait_value_max),a xor a ld (flash_color_wait_value),a inc a ld (flash_color_activate),a ret; ---------------------------; @todo - border ?!blackout:; --------------------------- ld hl,black_colors_data call sauv_image_pal; SET_GA_COLOR &10,&54 ret; ---------------------------set_image_pal:; ---------------------------; ld hl,BUFIMA+2 ; +2 = skip file length ld hl,MEMORY_BANK2_ADR+2; set_image_pal_intro -> used in intro.bin !!! call set_image_pal+3 push bc SET_ACTIVE_MEMORY_BANK MEMORY_BANK2 call sauv_image_pal SET_ACTIVE_MEMORY_BANK MEMORY_BANK0 pop bc ret; ---------------------------sauv_image_pal:; --------------------------- push bc push de ld de,actual_colors_data ld bc,16 ldir pop de pop bc ; ---------------------------restore_image_pal:; --------------------------- ld hl,actual_colors_data; ---------------------------setpal:; --------------------------- push bc call vbl_wait ld bc,&7f00 ld a,c ld (flash_color_activate),a ld a,17set_color_loop out (c),c outi inc b inc c cp c jr nz,set_color_loop pop bc ret; ---------------------------SCR_DOT_POSITION; --------------------------- push de ex de,hl ld hl,&00c7 or a sbc hl,de ld a,l and &07 add a,a add a,a add a,a ld c,a ld a,l and &f8 ld l,a ld d,h ld e,l add hl,hl add hl,hl add hl,de add hl,hl pop de push bc ld bc,&0388 ld a,b and e jr z,bd6 ; (+$05)bd1 rrc c dec a jr nz,bd1 ; (-$05)bd6 ex (sp),hl ld h,c ld c,l ex (sp),hl ld a,b rrcabdc srl d rr e rrca jr c,bdc ; (-$07) add hl,de ;ld de,($b7c4) ;add hl,de ;ld a,h ;and &07 ;ld h,a ld a,SCREEN_ADDRESS/&100 add a,h add a,c ld h,a pop de ld c,d ret