gbdk-2020 | GameBoy Development Kit |
| download: https://git.y1.nz/archives/gbdk.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit 9f55694b6da6c5abcde5150a4454d020aa72a78c parent 420d5ad7d5a2ae93d2ae265e6a11d607e38d111f Author: Toxa <untoxa@mail.ru> Date: Thu, 9 Sep 2021 12:17:44 +0300 rename area _BASE to _HOME Diffstat:
71 files changed, 106 insertions(+), 236 deletions(-)
diff --git a/gbdk-lib/examples/gb/samptest/Makefile b/gbdk-lib/examples/gb/samptest/Makefile @@ -16,7 +16,7 @@ compile.bat: Makefile $(CC) -c -o $@ $< %.gb: %.o sample.o - $(CC) -o $@ $< + $(CC) -o $@ $< sample.o clean: rm -f *.o *.lst *.map *.gb *~ *.rel *.cdb *.ihx *.lnk *.sym *.asm *.noi diff --git a/gbdk-lib/libc/asm/gbz80/__sdcc_call_hl.s b/gbdk-lib/libc/asm/gbz80/__sdcc_call_hl.s @@ -28,7 +28,7 @@ .module call_hl - .area _BASE + .area _HOME .globl ___sdcc_call_hl diff --git a/gbdk-lib/libc/asm/gbz80/_memcpy.s b/gbdk-lib/libc/asm/gbz80/_memcpy.s @@ -1,6 +1,6 @@ .module memcpy - .area _BASE + .area _HOME ; void *memcpy(void *dest, const void *source, int count) ___memcpy:: diff --git a/gbdk-lib/libc/asm/gbz80/_memset.s b/gbdk-lib/libc/asm/gbz80/_memset.s @@ -1,6 +1,6 @@ .module memset - .area _BASE + .area _HOME ; void *memset (void *s, int c, size_t n) _memset:: diff --git a/gbdk-lib/libc/asm/gbz80/_strcmp.s b/gbdk-lib/libc/asm/gbz80/_strcmp.s @@ -1,6 +1,6 @@ .module strcmp - .area _BASE + .area _HOME ; int strcmp(const char *s1, const char *s2) _strcmp:: diff --git a/gbdk-lib/libc/asm/gbz80/_strcpy.s b/gbdk-lib/libc/asm/gbz80/_strcpy.s @@ -1,6 +1,6 @@ .module strcpy - .area _BASE + .area _HOME ; char *strcpy(char *dest, const char *source) _strcpy:: diff --git a/gbdk-lib/libc/asm/gbz80/abs.s b/gbdk-lib/libc/asm/gbz80/abs.s @@ -1,6 +1,6 @@ .module abs - .area _BASE + .area _HOME ; int abs(int) _abs:: diff --git a/gbdk-lib/libc/asm/gbz80/atomic_flag_test_and_set.s b/gbdk-lib/libc/asm/gbz80/atomic_flag_test_and_set.s @@ -28,7 +28,7 @@ .module atomic - .area _BASE + .area _HOME .globl _atomic_flag_test_and_set diff --git a/gbdk-lib/libc/asm/gbz80/bcd.s b/gbdk-lib/libc/asm/gbz80/bcd.s @@ -28,7 +28,7 @@ .module bcd - .area _BASE + .area _HOME ; void uint2bcd(uint16_t i, BCD * value) __naked _uint2bcd:: diff --git a/gbdk-lib/libc/asm/gbz80/crt0_rle.s b/gbdk-lib/libc/asm/gbz80/crt0_rle.s @@ -29,7 +29,7 @@ .module rledecompress - .area _BASE + .area _HOME ;; Special RLE decoder used for initing global data ;; input: DE - destination address diff --git a/gbdk-lib/libc/asm/gbz80/div.s b/gbdk-lib/libc/asm/gbz80/div.s @@ -30,7 +30,7 @@ .module div - .area _BASE + .area _HOME .globl __divsuchar .globl __modsuchar diff --git a/gbdk-lib/libc/asm/gbz80/itoa.s b/gbdk-lib/libc/asm/gbz80/itoa.s @@ -28,7 +28,7 @@ .module itoa - .area _BASE + .area _HOME _uitoa:: push BC diff --git a/gbdk-lib/libc/asm/gbz80/labs.s b/gbdk-lib/libc/asm/gbz80/labs.s @@ -28,7 +28,7 @@ .module labs - .area _BASE + .area _HOME ;long labs(long num) _labs:: diff --git a/gbdk-lib/libc/asm/gbz80/ltoa.s b/gbdk-lib/libc/asm/gbz80/ltoa.s @@ -28,7 +28,7 @@ .module ltoa - .area _BASE + .area _HOME _ultoa:: push BC diff --git a/gbdk-lib/libc/asm/gbz80/mul.s b/gbdk-lib/libc/asm/gbz80/mul.s @@ -30,7 +30,7 @@ .module mul - .area _BASE + .area _HOME .globl __mulsuchar .globl __muluschar diff --git a/gbdk-lib/libc/asm/gbz80/rand.s b/gbdk-lib/libc/asm/gbz80/rand.s @@ -42,7 +42,7 @@ .randlo:: .ds 0x01 - .area _CODE + .area _HOME ;; Random number generator using the linear congruential method ;; X(n+1) = (a*X(n)+c) mod m @@ -105,8 +105,8 @@ _randw:: ; Banked ;; Registers used: ;; A, HL (need not be saved) and DE (return register) ;; - .area _BASE -_initrand:: ; Non banked + +_initrand:: LDA HL,2(SP) .initrand:: LD A,(HL+) diff --git a/gbdk-lib/libc/asm/gbz80/reverse.s b/gbdk-lib/libc/asm/gbz80/reverse.s @@ -28,7 +28,7 @@ .module reverse - .area _BASE + .area _HOME _reverse:: lda HL, 2(SP) diff --git a/gbdk-lib/libc/asm/gbz80/setjmp.s b/gbdk-lib/libc/asm/gbz80/setjmp.s @@ -28,7 +28,7 @@ .module longjmp - .area _BASE + .area _HOME .globl ___setjmp diff --git a/gbdk-lib/libc/asm/gbz80/shift.s b/gbdk-lib/libc/asm/gbz80/shift.s @@ -1,6 +1,6 @@ .module shift - .area _BASE + .area _HOME ;; __rrulong_rrx_s:: diff --git a/gbdk-lib/libc/asm/gbz80/strlen.s b/gbdk-lib/libc/asm/gbz80/strlen.s @@ -28,7 +28,7 @@ .module strlen - .area _BASE + .area _HOME _strlen:: lda HL, 2(SP) diff --git a/gbdk-lib/libc/targets/gbz80/___sdcc_bcall.s b/gbdk-lib/libc/targets/gbz80/___sdcc_bcall.s @@ -1,6 +1,6 @@ .include "global.s" - .area _BASE + .area _HOME ___sdcc_bcall:: banked_call:: ; Performs a long call. diff --git a/gbdk-lib/libc/targets/gbz80/___sdcc_bcall_ehl.s b/gbdk-lib/libc/targets/gbz80/___sdcc_bcall_ehl.s @@ -1,6 +1,6 @@ .include "global.s" - .area _BASE + .area _HOME ___sdcc_bcall_ehl:: ; Performs a long call. ldh a,(__current_bank) diff --git a/gbdk-lib/libc/targets/gbz80/ap/Makefile b/gbdk-lib/libc/targets/gbz80/ap/Makefile @@ -15,7 +15,7 @@ ASSRC = cgb.s cgb_palettes.s cgb_compat.s \ get_wi_t.s get_xy_t.s \ get_addr.s \ hiramcpy.s init_tt.s input.s \ - pad.s sample.s \ + pad.s \ serial.s set_bk_t.s set_tile.s \ set_data.s set_prop.s set_spr.s set_wi_t.s set_xy_t.s \ set_1bit_data.s \ diff --git a/gbdk-lib/libc/targets/gbz80/color.s b/gbdk-lib/libc/targets/gbz80/color.s @@ -12,7 +12,7 @@ .draw_mode:: .ds 1 - .area _BASE + .area _HOME _color:: LDA HL,2(SP) ; Skip return address and registers LD A,(HL+) ; A = Foreground diff --git a/gbdk-lib/libc/targets/gbz80/cpy_data.s b/gbdk-lib/libc/targets/gbz80/cpy_data.s @@ -1,7 +1,7 @@ .include "global.s" - ;; BANKED: checked - .area _BASE + .area _HOME + ;; Copy part (size = DE) of the VRAM from (BC) to (HL) .copy_vram:: INC D diff --git a/gbdk-lib/libc/targets/gbz80/delay.s b/gbdk-lib/libc/targets/gbz80/delay.s @@ -1,7 +1,6 @@ .include "global.s" - ;; BANKED: checked, imperfect - .area _BASE + .area _HOME ;; Delay DE milliseconds ;; diff --git a/gbdk-lib/libc/targets/gbz80/drawing.s b/gbdk-lib/libc/targets/gbz80/drawing.s @@ -34,8 +34,8 @@ .module Drawing1 - ;; Data .area _DATA + ;; Fill style .style: .ds 0x01 @@ -61,7 +61,8 @@ .ty: .ds 1 - .area _BASE + .area _HOME + ;; Enter graphic mode .gmode:: DI ; Disable interrupts @@ -188,7 +189,6 @@ 2$: RET - .area _CODE ;; Advance the cursor .adv_gcurs:: PUSH HL @@ -1556,7 +1556,6 @@ nchgy$: JR NZ,1$ RET - .area _CODE _gotogxy:: LDA HL,2(SP) ; Skip return address LD A,(HL+) ; A = x @@ -1704,7 +1703,6 @@ _plot:: POP BC RET - .area _BASE _switch_data:: ; Non Banked as pointer PUSH BC @@ -1748,7 +1746,6 @@ _draw_image:: ; Non banked as pointer POP BC RET - .area _BASE .y_table:: .word 0x8100,0x8102,0x8104,0x8106,0x8108,0x810A,0x810C,0x810E .word 0x8240,0x8242,0x8244,0x8246,0x8248,0x824A,0x824C,0x824E diff --git a/gbdk-lib/libc/targets/gbz80/drawing_isr.s b/gbdk-lib/libc/targets/gbz80/drawing_isr.s @@ -1,6 +1,6 @@ .include "global.s" - .area _BASE + .area _HOME .drawing_vbl:: LDH A,(.LCDC) diff --git a/gbdk-lib/libc/targets/gbz80/f_ibm_full.s b/gbdk-lib/libc/targets/gbz80/f_ibm_full.s @@ -1,6 +1,6 @@ ; font: font - ;; BANKED: checked - .area _BASE + + .area _HOME .globl font_load ;; Perform tricks with banking to shift this font out of diff --git a/gbdk-lib/libc/targets/gbz80/f_ibm_sh.s b/gbdk-lib/libc/targets/gbz80/f_ibm_sh.s @@ -1,6 +1,6 @@ ; ibm_fixed.ms - fixed width IBM font - ;; BANKED: checked, imperfect - .area _BASE + + .area _HOME ; 898 bytes giving ' '-'0'-'@'-'A'-'Z'-'???'-'a'-'z'-127 _font_ibm:: diff --git a/gbdk-lib/libc/targets/gbz80/f_italic.s b/gbdk-lib/libc/targets/gbz80/f_italic.s @@ -1,6 +1,6 @@ ; font: italic - ;; BANKED: checked,imperfect - .area _BASE + + .area _HOME _font_italic:: .db 1+4 ; 128 char encoding, compressed .db 93 ; Number of tiles diff --git a/gbdk-lib/libc/targets/gbz80/f_min.s b/gbdk-lib/libc/targets/gbz80/f_min.s @@ -5,9 +5,10 @@ ; michaelh@earthling.net ; Distrubuted under the Artistic License - see www.opensource.org ; - ;; BANKED: checked, imperfect + .module font_min - .area _BASE + .area _HOME + _font_min:: .byte 1+4 ; 128 character encoding .byte 37 ; Tiles required diff --git a/gbdk-lib/libc/targets/gbz80/f_spect.s b/gbdk-lib/libc/targets/gbz80/f_spect.s @@ -4,9 +4,10 @@ ; michaelh@earthling.net ; Distrubuted under the Artistic License - see www.opensource.org ; - ;; BANKED: checked, imperfect + .module font_spect - .area _BASE + .area _HOME + _font_spect:: .byte 1+4 ; 128 character encoding .byte 128-32 ; Tiles required diff --git a/gbdk-lib/libc/targets/gbz80/fill_rect.s b/gbdk-lib/libc/targets/gbz80/fill_rect.s @@ -1,6 +1,6 @@ .include "global.s" - .area _BASE + .area _HOME .fill_rect_wtt:: PUSH HL diff --git a/gbdk-lib/libc/targets/gbz80/fill_rect_bk.s b/gbdk-lib/libc/targets/gbz80/fill_rect_bk.s @@ -1,6 +1,6 @@ .include "global.s" - .area _BASE + .area _HOME _fill_bkg_rect:: PUSH BC diff --git a/gbdk-lib/libc/targets/gbz80/fill_rect_wi.s b/gbdk-lib/libc/targets/gbz80/fill_rect_wi.s @@ -1,6 +1,6 @@ .include "global.s" - .area _BASE + .area _HOME _fill_win_rect:: PUSH BC diff --git a/gbdk-lib/libc/targets/gbz80/font.s b/gbdk-lib/libc/targets/gbz80/font.s @@ -37,10 +37,21 @@ .module font.ms - ; Globals from drawing.s - ; FIXME: Hmmm... check the linkage of these - .globl .fg_colour - .globl .bg_colour + .globl .fg_colour, .bg_colour + + .globl .drawing_vbl, .drawing_lcd + .globl .int_0x40, .int_0x48 + .globl .remove_int + + .area _INITIALIZED +.curx:: ; Cursor position + .ds 0x01 +.cury:: + .ds 0x01 + + .area _INITIALIZER + .db 0x00 ; .curx + .db 0x00 ; .cury .area _DATA ; The current font @@ -54,7 +65,7 @@ font_first_free_tile:: font_table:: .ds sfont_handle_sizeof*.MAX_FONTS - .area _BASE + .area _HOME _font_load_ibm:: ld hl,#_font_ibm @@ -406,7 +417,6 @@ set_char_no_encoding: POP BC RET - .area _CODE _putchar:: PUSH BC LDA HL,4(SP) ; Skip return address @@ -423,7 +433,6 @@ _setchar:: POP BC RET - .area _BASE _font_load:: push bc LDA HL,4(SP) ; Skip return address and bc @@ -499,7 +508,6 @@ _cls:: POP DE RET - .area _CODE ; Support routines _gotoxy:: lda hl,2(sp) @@ -533,7 +541,6 @@ _posy:: LD E,A RET - .area _BASE ;; Rewind the cursor .rew_curs: PUSH HL @@ -636,24 +643,6 @@ _posy:: POP BC RET - .area _INITIALIZED -.curx:: ; Cursor position - .ds 0x01 -.cury:: - .ds 0x01 - - .area _INITIALIZER - .db 0x00 ; .curx - .db 0x00 ; .cury - - .area _BASE - - .globl .drawing_vbl - .globl .drawing_lcd - .globl .int_0x40 - .globl .int_0x48 - .globl .remove_int - ;; Enter text mode .tmode:: DI ; Disable interrupts diff --git a/gbdk-lib/libc/targets/gbz80/font_color.s b/gbdk-lib/libc/targets/gbz80/font_color.s @@ -2,7 +2,7 @@ .globl .fg_colour, .bg_colour - .area _BASE + .area _HOME _font_color:: LDA HL,2(SP) ; Skip return address and registers LD A,(HL+) ; A = Foreground diff --git a/gbdk-lib/libc/targets/gbz80/gb/Makefile b/gbdk-lib/libc/targets/gbz80/gb/Makefile @@ -15,7 +15,7 @@ ASSRC = cgb.s cgb_palettes.s cgb_compat.s \ get_wi_t.s get_xy_t.s \ get_addr.s \ hiramcpy.s init_tt.s input.s \ - pad.s sample.s \ + pad.s \ serial.s set_bk_t.s set_tile.s \ set_data.s set_prop.s set_spr.s set_wi_t.s set_xy_t.s \ set_1bit_data.s \ diff --git a/gbdk-lib/libc/targets/gbz80/get_bk_t.s b/gbdk-lib/libc/targets/gbz80/get_bk_t.s @@ -1,8 +1,6 @@ .include "global.s" - .globl .get_xy_btt - ;; BANKED: checked - .area _BASE + .area _HOME _get_bkg_tiles:: PUSH BC diff --git a/gbdk-lib/libc/targets/gbz80/get_data.s b/gbdk-lib/libc/targets/gbz80/get_data.s @@ -2,8 +2,7 @@ .globl .copy_vram - ;; BANKED: checked - .area _BASE + .area _HOME _get_bkg_data:: _get_win_data:: diff --git a/gbdk-lib/libc/targets/gbz80/get_t.s b/gbdk-lib/libc/targets/gbz80/get_t.s @@ -1,7 +1,6 @@ .include "global.s" - ;; BANKED: checked - .area _BASE + .area _HOME ; void get_tiles(uint8_t x, uint8_t y, uint8_t w, uint8_t h, uint8_t *vram_addr, uint8_t *tiles); diff --git a/gbdk-lib/libc/targets/gbz80/get_wi_t.s b/gbdk-lib/libc/targets/gbz80/get_wi_t.s @@ -1,8 +1,8 @@ .include "global.s" .globl .get_xy_wtt - ;; BANKED: checked, imperfect - .area _BASE + + .area _HOME _get_win_tiles:: PUSH BC diff --git a/gbdk-lib/libc/targets/gbz80/get_xy_t.s b/gbdk-lib/libc/targets/gbz80/get_xy_t.s @@ -1,7 +1,6 @@ .include "global.s" - ;; BANKED: checked - .area _BASE + .area _HOME ;; Store window tile table into (BC) at xy = DE of size WH = HL .get_xy_wtt:: diff --git a/gbdk-lib/libc/targets/gbz80/hiramcpy.s b/gbdk-lib/libc/targets/gbz80/hiramcpy.s @@ -1,7 +1,6 @@ .include "global.s" - ;; BANKED: checked - .area _BASE + .area _HOME _hiramcpy:: LDA HL,2(SP) ; Skip return address and registers diff --git a/gbdk-lib/libc/targets/gbz80/init_tt.s b/gbdk-lib/libc/targets/gbz80/init_tt.s @@ -1,7 +1,6 @@ .include "global.s" - ;; BANKED: checked - .area _BASE + .area _HOME ;; Initialize window tile table with B .init_wtt:: diff --git a/gbdk-lib/libc/targets/gbz80/init_vram.s b/gbdk-lib/libc/targets/gbz80/init_vram.s @@ -1,7 +1,6 @@ .include "global.s" - ;; BANKED: checked - .area _BASE + .area _HOME .globl .init_wtt, .init_btt, .init_vram diff --git a/gbdk-lib/libc/targets/gbz80/input.s b/gbdk-lib/libc/targets/gbz80/input.s @@ -2,7 +2,6 @@ ;; Note that while gets uses a pointer, the pointer had better ;; be in non-banked RAM else bad things will happen. - ;; BANKED: checked, imperfect .globl .copy_vram .globl .set_xy_wtt @@ -58,7 +57,7 @@ .string_len: ; Used length of input buffer .ds 0x01 - .area _BASE + .area _HOME ;; Enter text mode with input .tmode_inout:: @@ -188,7 +187,6 @@ set_recoded_win_tiles:: ADD SP,#4 RET - .area _CODE ;; Prompt the user for a char and return it in A .get_char: PUSH BC @@ -608,8 +606,6 @@ _gets:: POP DE RET - ;; PENDING: this is unfortunate. Refed from .tmode_inout - .area _BASE .tp1: .pointers: @@ -632,13 +628,9 @@ _gets:: .byte 0x1E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x1F .kbdtable: - ;; This is unfortunate. astorgb and rgbasm cant interpert: - ;; .ascii " !\"#$%&'()*+,-./" - ;; so we have to use the hex form here. .db 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27 .db 0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F .ascii "0123456789:" - ;; astorgb recognises the embedded ; as a comment :) .db 0x3B .ascii "<=>?" .ascii "@ABCDEFGHIJKLMNO" diff --git a/gbdk-lib/libc/targets/gbz80/joy.s b/gbdk-lib/libc/targets/gbz80/joy.s @@ -11,7 +11,7 @@ LD HL,#.int_0x60 JP .int - .area _BASE + .area _HOME _add_JOY:: PUSH BC diff --git a/gbdk-lib/libc/targets/gbz80/lcd.s b/gbdk-lib/libc/targets/gbz80/lcd.s @@ -7,7 +7,7 @@ .int_LCD: JP .int_lcd_handler - .area _BASE + .area _HOME .int_lcd_handler: PUSH AF diff --git a/gbdk-lib/libc/targets/gbz80/mv_spr.s b/gbdk-lib/libc/targets/gbz80/mv_spr.s @@ -1,7 +1,6 @@ .include "global.s" - ;; BANKED: checked - .area _BASE + .area _HOME ;; Move sprite number C at XY = DE .mv_sprite:: diff --git a/gbdk-lib/libc/targets/gbz80/pad.s b/gbdk-lib/libc/targets/gbz80/pad.s @@ -1,7 +1,6 @@ .include "global.s" - ;; BANKED: checked - .area _BASE + .area _HOME ;; Wait until all buttons have been released .padup:: diff --git a/gbdk-lib/libc/targets/gbz80/pad_ex.s b/gbdk-lib/libc/targets/gbz80/pad_ex.s @@ -2,7 +2,7 @@ .MLT_REQ = 0x11 - .area _BASE + .area _HOME _joypad_init:: call .sgb_check diff --git a/gbdk-lib/libc/targets/gbz80/sample.s b/gbdk-lib/libc/targets/gbz80/sample.s @@ -1,97 +0,0 @@ - .include "global.s" - - ;; BANKED: checked - .title "Sound sample player" - .module Sample - - .area _BASE - .AUD3WAVERAM = 0xff30 - -_play_sample:: - push bc - lda hl,4(sp) - ld a,(hl+) - ld d,(hl) - ld e,a - - lda hl,6(sp) - ld a,(hl+) - ld b,(hl) - ld c,a - - ld h,d - ld l,e - - call .play_sample - pop bc - ret - -; Playback raw sound sample with length BC from HL at 8192Hz rate. -; BC defines the length of the sample in samples/32 or bytes/16. -; The format of the data is unsigned 4-bit samples, -; 2 samples per byte, upper 4-bits played before lower 4 bits. -; -; Adaption for GBDK by Lars Malmborg. -; Original code by Jeff Frohwein. - -.play_sample:: - ld a,#0x84 - ldh (.NR52),a ;enable sound 3 - - ld a,#0 - ldh (.NR30),a - ldh (.NR51),a - - ld a,#0x77 - ldh (.NR50),a ;select speakers - ld a,#0xff - ldh (.NR51),a ;enable sound 3 - - ld a,#0x80 - ldh (.NR31),a ;sound length - ld a,#0x20 - ldh (.NR32),a ;sound level high - - ld a,#0x00 - ldh (.NR33),a ;sound freq low - -.samp2: - ld de,#.AUD3WAVERAM ;12 - push bc ;16 - ld b,#16 ;16 - - xor a - ldh (.NR30),a -.samp3: - ld a,(hl+) ;8 - ld (de),a ;8 - inc de ;8 - dec b ;4 - jr nz,.samp3 ;12 - - ld a,#0x80 - ldh (.NR30),a - - ld a,#0x87 ; (256hz) - ldh (.NR34),a - - ld bc,#558 ;delay routine -.samp4: - dec bc ;8 - ld a,b ;4 - or c ;4 - jr nz,.samp4 ;12 - - ld a,#0 ;more delay - ld a,#0 - ld a,#0 - - pop bc ;12 - dec bc ;8 - ld a,b ;4 - or c ;4 - jr nz,.samp2 ;12 - - ld a,#0xbb - ldh (.NR51),a ;disable sound 3 - ret diff --git a/gbdk-lib/libc/targets/gbz80/serial.s b/gbdk-lib/libc/targets/gbz80/serial.s @@ -34,7 +34,7 @@ LD A,#0x80 LDH (.SC),A ; Use external clock - .area _BASE + .area _HOME _add_SIO:: PUSH BC diff --git a/gbdk-lib/libc/targets/gbz80/set_1bit_data.s b/gbdk-lib/libc/targets/gbz80/set_1bit_data.s @@ -1,6 +1,6 @@ .include "global.s" - .area _BASE + .area _HOME _set_bkg_1bit_data:: _set_win_1bit_data:: diff --git a/gbdk-lib/libc/targets/gbz80/set_bk_t.s b/gbdk-lib/libc/targets/gbz80/set_bk_t.s @@ -1,8 +1,8 @@ .include "global.s" .globl .set_xy_btt - ;; BANKED: checked - .area _BASE + + .area _HOME _set_bkg_tiles:: PUSH BC diff --git a/gbdk-lib/libc/targets/gbz80/set_data.s b/gbdk-lib/libc/targets/gbz80/set_data.s @@ -1,7 +1,6 @@ .include "global.s" - ;; BANKED: checked - .area _BASE + .area _HOME _set_tile_data:: ldhl sp, #6 diff --git a/gbdk-lib/libc/targets/gbz80/set_prop.s b/gbdk-lib/libc/targets/gbz80/set_prop.s @@ -1,7 +1,6 @@ .include "global.s" - ;; BANKED: checked, imperfect - .area _BASE + .area _HOME ;; Set properties of sprite number C to D .set_sprite_prop:: diff --git a/gbdk-lib/libc/targets/gbz80/set_spr.s b/gbdk-lib/libc/targets/gbz80/set_spr.s @@ -1,7 +1,6 @@ .include "global.s" - ;; BANKED: checked, imperfect - .area _BASE + .area _HOME ;; Set sprite number C to tile D .set_sprite_tile:: diff --git a/gbdk-lib/libc/targets/gbz80/set_t.s b/gbdk-lib/libc/targets/gbz80/set_t.s @@ -2,8 +2,7 @@ .globl .set_xy_tt - ;; BANKED: checked, imperfect - .area _BASE + .area _HOME ; void set_tiles(uint8_t x, uint8_t y, uint8_t w, uint8_t h, uint8_t *vram_addr, const uint8_t *tiles); diff --git a/gbdk-lib/libc/targets/gbz80/set_tile_submap.s b/gbdk-lib/libc/targets/gbz80/set_tile_submap.s @@ -5,7 +5,7 @@ .image_tile_width:: .ds 0x01 - .area _BASE + .area _HOME _set_bkg_submap:: ldhl sp, #2 diff --git a/gbdk-lib/libc/targets/gbz80/set_wi_t.s b/gbdk-lib/libc/targets/gbz80/set_wi_t.s @@ -3,7 +3,7 @@ .globl .set_xy_wtt ;; BANKED: checked, imperfect - .area _BASE + .area _HOME _set_win_tiles:: PUSH BC diff --git a/gbdk-lib/libc/targets/gbz80/set_win_tile_submap.s b/gbdk-lib/libc/targets/gbz80/set_win_tile_submap.s @@ -2,7 +2,7 @@ .globl .image_tile_width, .set_xy_win_submap - .area _BASE + .area _HOME _set_win_submap:: ldhl sp, #2 diff --git a/gbdk-lib/libc/targets/gbz80/set_xy_t.s b/gbdk-lib/libc/targets/gbz80/set_xy_t.s @@ -1,6 +1,6 @@ .include "global.s" - .area _BASE + .area _HOME ;; Set window tile table from BC at XY = DE of size WH = HL .set_xy_wtt:: diff --git a/gbdk-lib/libc/targets/gbz80/tim.s b/gbdk-lib/libc/targets/gbz80/tim.s @@ -11,7 +11,7 @@ LD HL,#.int_0x50 JP .int - .area _BASE + .area _HOME _add_TIM:: PUSH BC diff --git a/gbdk-lib/libc/targets/z80/f_ibm_full.s b/gbdk-lib/libc/targets/z80/f_ibm_full.s @@ -1,6 +1,6 @@ ; font: font - ;; BANKED: checked - .area _BASE + + .area _HOME .globl font_load ;; Perform tricks with banking to shift this font out of diff --git a/gbdk-lib/libc/targets/z80/f_ibm_sh.s b/gbdk-lib/libc/targets/z80/f_ibm_sh.s @@ -1,6 +1,6 @@ ; ibm_fixed.ms - fixed width IBM font - ;; BANKED: checked, imperfect - .area _BASE + + .area _HOME ; 898 bytes giving ' '-'0'-'@'-'A'-'Z'-'???'-'a'-'z'-127 _font_ibm:: diff --git a/gbdk-lib/libc/targets/z80/f_italic.s b/gbdk-lib/libc/targets/z80/f_italic.s @@ -1,6 +1,7 @@ ; font: italic - ;; BANKED: checked,imperfect - .area _BASE + + .area _HOME + _font_italic:: .db 1+4 ; 128 char encoding, compressed .db 93 ; Number of tiles diff --git a/gbdk-lib/libc/targets/z80/f_min.s b/gbdk-lib/libc/targets/z80/f_min.s @@ -5,9 +5,9 @@ ; michaelh@earthling.net ; Distrubuted under the Artistic License - see www.opensource.org ; - ;; BANKED: checked, imperfect .module font_min - .area _BASE + .area _HOME + _font_min:: .byte 1+4 ; 128 character encoding .byte 37 ; Tiles required diff --git a/gbdk-lib/libc/targets/z80/f_spect.s b/gbdk-lib/libc/targets/z80/f_spect.s @@ -4,9 +4,10 @@ ; michaelh@earthling.net ; Distrubuted under the Artistic License - see www.opensource.org ; - ;; BANKED: checked, imperfect + .module font_spect - .area _BASE + .area _HOME + _font_spect:: .byte 1+4 ; 128 character encoding .byte 128-32 ; Tiles required
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.