This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; BRESENHAM LINE DRAWING | |
; This assumes MODE 4 (SAM coupé) with screen in 0-24575. | |
;------------------------------------------- | |
line.plotHLC: | |
; Plot a point at (L,H) with colour C (0-15 only) | |
ex af,af' | |
push bc | |
push hl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Example of rotation in Mode 4 for the SAM Coupé | |
inc_d: equ &14 | |
inc_e: equ &1c | |
dec_d: equ &15 | |
dec_e: equ &1d | |
;---------------------------------------------- | |
gfx.print_rotatedHLDEBCA: | |
; Print bitmap rotated. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; MATHS ROUTINES | |
;-------------------------------------------- | |
math.multDEBC: | |
; Input: DE = Multiplier, BC = Multiplicand | |
; Output: DE:HL = Product | |
; By Baze of 3SC. http://map.grauw.nl/sources/external/z80bits.html | |
ld hl,0 | |
sla e | |
rl d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; +++++++++++++++++++++ | |
; SID TEST 3: 28-May-17 | |
; +++++++++++++++++++++ | |
; Conversion of one-page basic SID benchmark by Plogue R&D | |
; http://ploguechipsounds.blogspot.co.uk/2010/05/one-page-basic-sid-benchmark.html | |
; Compiled with PYZ80 | |
dump 1,0 | |
autoexec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; +++++++++++++++++++++ | |
; SID TEST 2: 24-May-17 | |
; +++++++++++++++++++++ | |
; Straight conversion of the C64 user manual example of playing a single-channel tune. | |
; Original program from http://www.lemon64.com/manual/manual/8_1.html | |
; Compiled with PYZ80 | |
dump 1,0 | |
autoexec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
org 32768 | |
init_scroll: | |
ld hl,message-1 ; set to refresh char on first call | |
ld (scroll_pos),hl | |
ld hl,pix_count ; variable to check if new character needed | |
ld (hl),1 | |
ret | |
update_scroll: |