TileGen Routine
- ;======================================
- ; tilegen by James Malcolm (me@jgmalcolm.com)
- ; draws 16x8 tile map
- ;======================================
- tilegen:
- ld ix,$fc00
- ld b,8
- loop_row:
- push bc
- columns:
- ld b,16
- loop_columns:
- push hl
- ld l,(hl)
- ld h,0
- add hl,hl
- add hl,hl
- add hl,hl
- ld de,tile0
- add hl,de
- draw_tile:
- ld de,$10
- ld c,b
- ld b,8
- push ix
- draw_tile_loop:
- ld a,(hl)
- ld (ix),a
- add ix,de
- inc hl
- djnz draw_tile_loop
- pop ix
- ld b,c
- pop hl
- inc hl
- inc ix
- djnz loop_columns
- ld de,$10*7
- add ix,de
- pop bc
- djnz loop_row
- ret
More from z80 » Graphics
Find a Pixel // Grayscale // Pixel Manipulation // The Screen // Sprites // SDR8 Routine // Tile Maps // TileGen Routine