Stockly.com Forums  

Go Back   Stockly.com Forums > Altair 8800 > Altair 8800
FAQ Community Calendar Today's Posts Search

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 07-09-2007, 05:42 AM
Grant Stockly Grant Stockly is offline
Administrator
 
Join Date: Jan 2005
Posts: 447
Default Music in EPROM project

I want to make a set of EPROMs for VTL-2 for the 8080. The 5th EPROM is only used for 9 bytes. What a waste!

The "Fool on the Hill" and "Daisy" songs from Steve Dompler are 215 bytes long. I used a combination of OCR and hand correction to convert the listing into text. From here I will need to convert the octal into hex. I thought I had located an octal to hex online coverter, but I can't find it now!

FC10-FCFF are free. That's 240 bytes. (Technically there are 6 more bytes ahead of that if we need them). The music COULD be run out of ROM, but then the tempo and start/stop address could not be changed. Also, the modification for playing the song backwards wouldn't be possible.

The loader I came up with is:
Code:
01 0000         ;Loader to move 215 bytes from ROM to RAM
02 0000         ;
03 FC28         .EQU SOURCE,H'FC28      ;ADDRESS OF START
04 0000         .EQU DESTINATION,H'0000 ;DESTINATION ADDRESS
05 00D7         .EQU LENGTH,215         ;LENGTH OF COPY
06 0000         ;
07 FC10         .org H'FC10   ;FC10 IS PROGRAM STARTING POINT IN MEMORY
08 FC10         ;
09 FC10 0128FC  INIT:   LXI B, SOURCE       ;STARTING ADDRESS IN ROM FOR SOURCE
10 FC13 110000          LXI D, DESTINATION  ;STARTING ADDRESS IN RAM FOR DESTINATION
11 FC16 0A      LOADLP: LDAX  B     ;LOAD BYTE FROM ROM
12 FC17 12              STAX  D     ;STORE BYTE IN RAM
13 FC18 03              INX B       ;INCREASE ROM ADDRESS POINTER BY ONE
14 FC19 13              INX D       ;INCREASE RAM ADDRESS POINTER BY ONE
15 FC1A         
16 FC1A 7B              MOV A,E     ;COMPARE LOW MEMORY POINTER TO GOAL
17 FC1B FED7            CPI ((DESTINATION+LENGTH)&H'00FF)
18 FC1D C216FC          JNZ LOADLP  ;NOT EQUAL, CONTINUE
19 FC20         ;       MOV A,D     ;COMPARE HIGH MEMORY POINTER TO GOAL
20 FC20         ;       CPI ((DESTINATION+LENGTH)&H'FF00)>>8
21 FC20         ;       JNZ LOADLP  ;NOT EQUAL, CONTINUE
22 FC20         
23 FC20 C30000          JMP H'0000  ;MEMORY COPIED, JMP to 0000
DESTINAT=0000  
INIT    =FC10  
LENGTH  =00D7  
LOADLP  =FC16  
SOURCE  =FC28
I didn't have enough space to do the high address compare, but with only 215 bytes it isn't necessary.

Does anyone see any mistakes?

Here is the data to occur at 0xFC28 to FCFE.

Code:
000    LXl H    041
001    b2    xxx
002    b3    xxx
003    MOV A,M    176
004    CPI    376
005    b2    377
006    JZ    312
007    b2    000
010    b3    000

011    MVI D    026
012    b2    xxx
013    DCR B    005
014    JNZ    302
015    b2    020
016    b3    000
017    MOV B,M    106

020    DCR C    015
021    JNZ    302
022    b2    013
023    b3    000
024    DCR D    025
025    JNZ    302
026    b2    013
027    b3    000

030    INR L    054
031    JMP    303
032    b2    003
033    b3    000
034        N/A
035        N/A
036        N/A
037        N/A

040 105
041 105
042 125
043 100
044 071
045 063
046 063
047 063

050 071
051 063
052 055
053 053
054 053
055 055
05ó 071
057 063

060 046
061 046
062 046
063 071
064 063
065 046
066 046
067 053

070 042
071 046
072 046
073 063
074 071
075 063
076 053
077 053

100 063
101 053
102 071
103 063
104 063
105 071
106 063
107 046

110 046
111 046
112 053
113 042
114 053
115 046
116 046
117 053

120 055
121 053
122 071
123 066
124 100
125 071
126 071
127 100

130 071
131 066
132 066
133 071
134 100
135 100
136 100
137 071

140 066
141 060
142 060
143 066
144 071
145 066
146 066
147 060
       
150 053
151 046
152 046
153 046
154 046
155 044
156 046
157 053

160 053
161 053
162 053
163 053
164 002
165 002
166 002
167 377

170 034
171 034
172 034
173 042
174 042
175 042
176 053
177 053

200 053
201 071
202 071
203 071
204 063
205 055
206 053
207 063

210 063
211 053
212 071
213 071
214 071
215 071
216 071
217 071

220 046
221 046
222 046
223 034
224 034
225 034
226 042
227 042

230 042
231 053
232 053
233 053
234 063
235 055
236 053
237 046

240 046
241 042
242 046
243 046
244 046
245 046
246 046
247 042

250 040
251 042
252 046
253 034
254 034
255 042
256 046
257 053

260 053
261 053
262 053
263 046
264 042
265 042
266 053
267 063

270 063
271 053
272 063
273 071
274 071
275 071
276 071
277 071

300 053
301 053
302 042
303 046
304 046
305 071
306 053
307 053

310 042
311 046
312 042
313 040
314 034
315 042
316 053
317 046

320 046
321 071
322 053
323 053
324 053
325 053
326 002
327 377
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
FS: Tenor Model 763 EPROM Programmer TomL_12953 Classifieds 0 09-09-2009 02:26 AM
Kenbak Assembler Project Grant Stockly Kenbak-1 0 08-29-2007 08:30 AM
Kenbak-1 Music Project Idea Grant Stockly Kenbak-1 2 08-29-2007 04:28 AM


All times are GMT. The time now is 04:38 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2024, vBulletin Solutions, Inc.