Skip to content

Commit 82e0ac2

Browse files
committed
New firmware release R2.1: added SOUND and VOLUME commands
1 parent 49417d3 commit 82e0ac2

File tree

7 files changed

+5986
-0
lines changed

7 files changed

+5986
-0
lines changed
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
; ------------------------------------------------------------------------------
2+
; LM80C - FIRMWARE - R2.1
3+
; ------------------------------------------------------------------------------
4+
; The following code is intended to be used with LM80C Z80-based computer
5+
; designed by Leonardo Miliani. More info at
6+
; www DOT leonardomiliani DOT com
7+
; ------------------------------------------------------------------------------
8+
; Coding/Editing/Compiling:
9+
; Original init code for MC68B05 by Grant Searle
10+
; Original SIO/CTC/PIO init code by Mario Blunk
11+
; NASCOM BASIC originally modified by Gran Searle
12+
; Code modified and adapted for LM80C by Leonardo Miliani
13+
;
14+
; Edited with Atom Editor
15+
;
16+
; Compiled with ZASM assembler 4.2.4
17+
; https://k1.spdns.de/Develop/Projects/zasm-4.0/Distributions/
18+
; ------------------------------------------------------------------------------
19+
; Copyright notes:
20+
; Parts of the code (c) Grant Searle - free for non commercial use
21+
; Please include this advice and the note to the attribution of the original
22+
; version to Grant Searle if you intend to redistribuite it
23+
; http://searle.hostei.com/grant/index.html
24+
25+
;
26+
; Parts of the code (c) Mario Blunk
27+
; http://www.train­z.de
28+
;
29+
; NASCOM ROM BASIC Ver 4.7, (C) 1978 Microsoft
30+
; Scanned from source published in 80-BUS NEWS from Vol 2, Issue 3
31+
; (May-June 1983) to Vol 3, Issue 3 (May-June 1984)
32+
; Adapted for the freeware Zilog Macro Assembler 2.10 to produce
33+
; the original ROM code (checksum A934H). PA
34+
;
35+
; Parts of the code by Leonardo Miliani
36+
; www DOT leonardomiliani DOT com
37+
; ------------------------------------------------------------------------------
38+
; Code Revision:
39+
; R1.3 - 20190521 - Added preliminary support for video cursor management
40+
; R1.4 - 20190524 - Added scrolling capabilities
41+
; R1.5 - 20190525 - Added backspace functionality
42+
; R1.6 - 20190601 - Fixed scrolling bugs
43+
; R1.7 - 20190606 - Added "screen" command; code revision
44+
; R1.8 - 20190615 - Better cursor integration; added VPOKE & VPEEK statements; 6x8 & 8x8 fonts
45+
; R1.9 - 20190620 - New VREG, VSTAT, & LOCATE statement; 8x8 pixels font completed
46+
; R2.0 - 20190714 - Added SREG & SSTAT to write to/read from PSG
47+
; R2.1 - 20190818 - Added SOUND command to play simple tones and VOLUME command
48+
;
49+
; -----------------------------------------------------------------------------
50+
51+
; this line instructs the assembler to prepare a file for a ROM target
52+
; meaning that blank cells will be filled up with 0xff
53+
#target rom
54+
55+
; this line instructs the assembler to compile taking account that code
56+
; starts at $0000 (the address reached by Z80 upon reset)
57+
#code BOOT, 0000h
58+
59+
; ------------------------------------------------------------------------------
60+
; include the latest version of the bootloader: this sets up the address aliases
61+
; configure the hardware, checks if warm or cold startup and loads the BASIC interpreter
62+
#include "../include/bootloader/bootloader-r21.asm"
63+
64+
; incude the latest version of the VDP module
65+
#include "../include/vdp/vdp-r21.asm"
66+
67+
; incude the latest version of the PSG module
68+
#include "../include/psg/psg-r21.asm"
69+
70+
; include the latest version of the NASCOM BASIC interpreter
71+
#include "../include/basic/basic32k-r21.asm"
72+
73+
; include the latest version of the font sets
74+
#include "../include/vdp/6x8fonts.asm"
75+
#include "../include/vdp/8x8fonts.asm"
76+
77+
; END OF ASSEMBLY SOURCE
78+
#end
79+
80+
;-------------------------------------------------------------------------------
File renamed without changes.

BASIC examples/LM80C-R20-sound.bas

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
10 REM SOUND DEMO - WORKS WITH HW/FW >= 2.0
2+
20 SREG 7,&B11101000:REM Enable Ch.A,B,& C + noise
3+
30 SREG 0,100:REM Ch.A tone
4+
40 SREG 2,200:REM Ch.B tone
5+
50 SREG 4,250:REM Ch.C tone
6+
60 SREG 11,0:SREG 12,25:REM Set envelopre frq. for Ch.C
7+
70 SREG 13,12:REM Set envelope mode for Ch.C
8+
80 SREG 8,15:REM Ch.A volume
9+
90 SREG 9,15:REM Ch.B volume
10+
100 SREG 10,16:REM Ch.C volume & envelope mode on

0 commit comments

Comments
 (0)