aboutsummaryrefslogtreecommitdiffstats
path: root/CHANGES
blob: 30fc13f752210efba1a60d306e7d9c094adb3541 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
Changes in release DE1-17:
--------------------------
* Fix handling of "abcprintd -d directory" with a relative pathname
  for "directory".


Changes in release DE1-16:
--------------------------
* Revert text files back to Latin-1 character encoding, since Cygwin
  apparently doesn't support Unicode yet.


Changes in release DE1-15:
--------------------------
* Add a hack to UFD-DOS so the PRA: and PRB: devices get automatically
  initialized.


Changes in release DE1-14:
--------------------------
* File transfers via abcprintd:

  If abcprintd is started with the -d option, the ABC80 can transfer
  files to and from a specific directory:

  abcprintd -d directory /dev/ttySx [print command...]

  On Cygwin, the port number is the Windows port number minus 1,
  e.g. if Windows calls your USB serial dongle "COM7", you should
  refer to it as /dev/ttyS6.

  You have to reflash your ABC80 ROM (abc80rom.bin) for the file
  transfer feature, since it has new code for the printer option ROM.

  To use it, access files on the device PRA: for ASCII mode transfer,
  or PRB: for binary/block mode transfer.


Changes in release DE1-13:
--------------------------
* Reset the audio DAC before programming it.  That way we avoid
  potential painful sounds if another application has been using
  it in another mode.
* More correct DAC programming.  In particular, the DAC was
  incorrectly programmed into DSP mode, when it was expected to be
  used in I2S mode.
* Pad all the audio samples with zero to avoid signedness issues.


Changes in release DE1-12:
--------------------------
* Fix misreading of the spec w.r.t. the HCS bit in ACMD41.  Add a
  unique error code (E8) to ACMD41 failure.  Shouldn't
  really matter much.


Changes in release DE1-11:
--------------------------
* Read the SD OCR properly - in DE1-10 all *non*-SDHC cards were broken...


Changes in release DE1-10:
--------------------------
* Fix a bug during initialization which would result in SD card
  initialization failure E6 on most cards - but, of course, not the
  one I was using for development.
* Fix the support for SDHC cards.  Now at least one particular SDHC
  card works.


Changes in release DE1-9:
-------------------------
* Fix potential race conditions in the handling of the SD internal
  buffer.


Changes in release DE1-8:
-------------------------
* Better error handling for SD card intialization errors.  Now
  displays an error code on the display as well as returns an error
  to ABC80 instead of hanging indefinitely.
 

Changes in release DE1-7:
-------------------------
* I2C unit to initialize the audio DAC (previously the sound only
  worked if the Terasic Control Panel had already been run.)


Changes in release DE1-6:
-------------------------
* SW5 now produces a LCD monitor calibration pattern on the screen.

* Printer/V.24 moved to SW3.


Changes in release DE1-5:
-------------------------
* Fix hang on reset with no SD card inserted (or SW0 off.)


Changes in release DE1-4:
-------------------------
* SW6 now means a no-blink cursor.

* Printer/V.24 is now SW5.

* Added patch to UFD-DOS to clear the Ctrl-C flag.  There may be other
  things from "ufdpatch.ny" worth including (see data/ufdpatch.ny).

  -> You have to rewrite your Flash for this to take effect!


Changes in release DE1-3:
-------------------------
* Writes to the SD card now work!

* The SD controller no longer crashes if write protect (SW1) is set.


Changes in release DE1-2:
-------------------------
* The SD card slot now works, although it has not been extensively
  tested.  HOWEVER:

  *** The DE1 card does not connect the two pins on the SD socket that
  *** are used to detect the presence of a card, and to test the write
  *** protect switch.  Therefore, we have to simulate them with SW0
  *** (card present) and SW1 (write protect).  DO NOT remove the card
  *** when SW0 is ON (UP).

  LEDG0 is CARD ACTIVE; don't switch SW0 when LEDG0 is on.

* The SD card controller currently crashes if the card is write
  protected (SW1 is on).

* There are a number of variants of the SD card protocol.  I can only
  promise it works with my particular card (SanDisk 256 MB).

* The green LEDs (except LEDG2) are the same as on the NIOS card,
  they are, again:

  LEDG0 - disk (SD) activity (for real!)
  LEDG1 - disk selected (like the old LED 0)
  LEDG2 - unused
  LEDG3 - CAS: relay    (OUT 58,32)
  LEDG4 - CAS: data out (OUT 58,64)
  LEDG5 - turbo 3 (25 MHz)
  LEDG6 - turbo 2 (12, 25 MHz)
  LEDG7 - turbo 1 (6, 12, 25 MHz)

  The red LEDs simply show the position of the switches.


Changes in release DE1-1:
-------------------------
* Cleanups to synthesize correctly under Quartus II 8.1 Web Edition.

* Port to the Terasic DE1/Altera Cyclone II Starter Kit board.

* The SD flash card doesn't work yet.

* The (only) RS232 port is used either as V.24 (RxD and TxD *only*) or
  printer port, depending on SW6.

* Button ("key") and switch assignments are as follows:

  KEY0 - Reveal text
  KEY1 - Video mode test
  KEY2 - CPU reset
  KEY3 - Turbo mode
  
  SW6  - UP: Serial port is V.24, DOWN: Serial port is printer
  SW7  - UP: Inverse video, DOWN: Normal video
  SW8  - UP: Boot up at 3 MHz, DOWN: Boot up at 25 MHz
  SW9  - UP: Boot up in 40-column mode, DOWN: Boot up in 80-column mode.

* The EP2C20 has less internal memory than EP1C20.  Thus, we use the
  external flash for ROM.  The image data/abc80rom.bin needs to be
  flashed into the flash at offset 0 using the Terasic Control Panel
  application.  Remember to erase the flash first.

  The flash is slower than SRAM.  Thus, reads from flash has two WAIT#
  cycles at 25 MHz and one WAIT# cycle at 12 MHz.  The flash runs at
  full speed at 6 or 3 MHz.

  Because of the structure of the MMU, only the first 1 MB of the
  flash is accessible.  This may change.

* The MMU space numbers have been reassigned, see data/mmuinit.pl.
  They may change again.

* Fix the "tools" directory so it compiles correctly under Cygwin.

* A Z80 disassembler now included in the "tools" directory.


Changes in release 18:
----------------------
* Cleanups to synthesize correctly under Quartus II 5.1 SP2.

* For the "parallel" printer, don't use BREAK as end of job marker; it
  turns out too many modern serial ports -- especially USB ones --
  don't correctly handle an incoming BREAK.  Instead, turn FF into FF
  FF and use FF 00 as end of job.  This is done in hardware, so the
  firmware shouldn't notice.  abcprintd has been changed accordingly.

* In abcprintd, print "box" (ASCII 127) as a solid dot; looks better
  in standard PostScript Courier.

* Update the Z80 assembler, and include it in the release.

* This file changed from ISO-8859-1 encoding to UTF-8 encoding.


Changes in release 17:
----------------------
* Fix using SW3 as turbo button (broken in release 16.)


Changes in release 16:
----------------------
* Support the ABC80 sound generator.  The original ABC80 had an
  SN76477 semianalog synthesizer chip, largely crippled by using fixed RC
  circuits for its adjustables.  For the FPGA, emulate the operation
  using digital logic, but I believe the correspondance should be very
  good, at least to the extent that the real SN76477 matches the
  datasheet.  There is clearly *some* differences, or "out 6,255"
  would be silent on ABC80.  I simply made a guess as to how those
  sounds should be generated.  If someone with a real ABC80 could
  record a set of files of all 128 sounds I might be able to get even
  closer.

  1 REM This program plays all 128 sounds in order
  2 FOR I%=1% to 255% STEP 2%
  3 GET Z�
  4 PRINT I%
  5 OUT 6%,0%,6%,I%
  6 NEXT I%
  7 GET Z�
  8 OUT 6%,0%

* The display now shows the frequency in MHz by default.

* The LEDs can now be controlled programmatically if desired.

  OUT 148,X    X = 1 to control single LEDs + 2 to control display
  OUT 149,L    Sets the individual LEDs
  OUT 150,A    Sets the right display (units)
  OUT 151,B    Sets the left display (tens)

  All of these can be read back via INP(port), too.

* Centralize all the non-ABC-compatible register handling (MMU, turbo,
  LEDs.)  The turbo can now be read back (via INP(144)), in addition
  to the MMU registers which have always been readable.

* For those sick enough to want it, the cassette port is now connected
  to the following pins on Prototype Connector 1 (J11):

  Relay   - pin 29
  Output  - pin 28
  Input   - pin 38
  Ground  - pin 26, 30 and 40

  These signals are 5V and TTL-compatible.  +5V is available on pin 2
  of J12.  See page 20 of the "Nios Development Board Reference
  Manual, Cyclone Edition" (version 1.0).

Changes in release 14/15:
-------------------------
* Make the Ethernet controller available to the ABC80.  The Verilog
  for this is a bit ugly, because I really wanted to do something that
  could be implemented on a real ABC-bus card, but the Ethernet chip
  on the Altera board shares a bus with the memory.

  The Ethernet chip is an SMSC 91C111 controller; it has 128
  byte-sized registers, divided into 8 banks of 16 registers each.
  This is implemented as follows:

  OUT 1,25    - hardware select
  OUT 2,R*8+B - select register R of bank B
  OUT 0,data  - write data from selected register
  INP(0)      - read data from selected register

  WARNING: If you write the address select register (bank 1,
  register 3) then you will need to power cycle the board before you
  can access the Ethernet chip again.

* Support DBLE/NRML (141, 140) on the video display -- it should now
  have all the capabilities of the ABC800C video unit, plus black text
  and being able to press SW0 to reveal hidden text.

  As I kid, I always wondered how DBLE/NRML were implemented in
  hardware.  The answer is, it's a pain!

* Make the printer interface closer to the original ABC80 Centronics
  card.  See data/printer.asm and printer.v.


Changes in release 13:
----------------------
* Fix bug introduced during port to msxz80asm that would cause the
  comma (,) key, 44 decimal, to give a capital (D), 0x44 hex.


Changes in release 12:
----------------------
* Switch from the horrible "masm" Z80 assembler to msxz80asm:
  http://savannah.nongnu.org/projects/z80asm/

* Use Write and Verify when writing to the CompactFlash card.


Changes in release 11:
----------------------
* CompactFlash mystery solved: there is a cf_power pin which turns off
  power to the CompactFlash card on the board!  It was left floating,
  which apparently means the power supply to the CF card worked *most*
  of the time... apparently not always.  Tie this pin to VCC seems to
  work.

* Cleaned up the generation of chargen.mif a bit.  Also generate .bas
  files to select Danish/Norwegian or International (= US) charset.


Changes in release 10:
----------------------
* Bang hard on getting the CompactFlash interface more stable.  I
  still get data corruption on cards after they have been used a while;
  unfortunately it seems to be a bug on the cards themselves and I don't
  know how to work around it.

* Remove some old debugging code in T80PIO.

* Four levels of speed control: 3, 6, 12, 25 MHz.
  out 144,0 = 3 MHz, out 144,1 = 6 MHz etc.

* New LED assignment:

  LED 0 - disk (CF) activity (for real!)
  LED 1 - disk selected (like the old LED 0)
  LED 2 - CF card in slot
  LED 3 - CAS: relay    (OUT 58,32)
  LED 4 - CAS: data out (OUT 58,64)
  LED 5 - turbo 3 (25 MHz)
  LED 6 - turbo 2 (12, 25 MHz)
  LED 7 - turbo 1 (6, 12, 25 MHz)


Changes in release 9:
---------------------
* Add support to use serial port B (DEBUG) as a lame printer port.
  Since this port supports no handshake, at least on the board I have
  (Altera Nios Development Kit Cyclone Edition), it simply prints
  at default 115200 baud.  Since serial printers are virtually extinct
  I am using a program running on a Linux box to actually send the
  data to my printer; see tools/abcprintd.c.

  The hardware interface is as follows:

  OUT 1,24     - hardware select
  OUT 0,<byte> - send data byte
  OUT 2,<time> - send BREAK for time+1 bit times
  OUT 3,L,4,H  - set baud rate to 25000000/(H:L+1)
  INP(1)       - bit 0: sending byte
	         bit 1: sending break
		 bit 2: handshake active (not currently used)

  The idea is to wait until port 1 is zero before doing anything.

  The printer ROM sends BREAK on CLOSE, so that the other side knows
  that it can send the data to the printer now (job separator.)

* The top half of the Printer Option ROM area (7800h-7BFFh) is now
  RAM; the idea is to move the UFD-DOS poke variables there
  eventually.

  (UFD-DOS was actually the operating system for ABC800, not ABC80.
  I found a port of it to ABC800 in ABC-Klubbens programbank; this is
  good since the older ABC80 DOS wouldn't have supported "hard drives"
  or subdirectories.)


Changes in release 8:
---------------------
* A whole bunch of changes in version 7 was in the programming files,
  but hadn't actually been checked into the published sources!  In other
  words, the source code was wrong, and I actually ended up having to
  re-debug the CompactFlash controller from scratch.  Fix a whole bunch
  of glitches.

* Update the sources for Quartus II version 4.1 compatibility.

* New LED assignment:

  LED 0 - disk (CF) activity (for real!)
  LED 1 - disk selected (like the old LED 0)
  LED 2 - CF card in slot
  LED 3 - unused
  LED 4 - unused
  LED 5 - CAS: relay    (OUT 58,32)
  LED 6 - CAS: data out (OUT 58,64)
  LED 7 - turbo (25 MHz)


Changes in release 7:
---------------------
* Make the "80-character BASIC patch ROM" available regardless of the
  memory type; it's now enabled by bit 15 in the MMU physical page
  number.  Writes always go to the target memory type, but reads come
  from the patch ROM if the address matches and it's enabled.

  -> Note: This means the default memory map 1 isn't usable to load
     something that shouldn't be patched, such as the checksum 11273
     BASIC or a BASIC II.  If so, the following program will "scrub"
     map 1 and turn off the patch bits for all the entries:

     1 FOR I%=0% to 63%
     2 OUT 128%,I% : OUT 129%,1%
     3 OUT 130%,INP(130%) : OUT 131%,INP(131%) AND 127%
     4 NEXT I%

* Accordingly, change the "hyperspace" memory type to 7, and allow
  bits [7:0] of the physical page to determine what byte gets
  returned.


Changes in release 6:
---------------------
* Run at 25 MHz in turbo mode (3 MHz in non-turbo mode.)
  
  -> At 25 MHz the standard key repeat rate is probably too fast.
     In ABC80 keyboard repeat is done by timing loops in the BASIC
     interpreter; this can be dealt with by loading the BASIC into RAM
     and modifying it.

     The following program can be used to copy the BASIC into RAM:

     1 POKE 65408%,175%,111%,103%,95%,87%,79%,6%,128%,62%,4%,211%,132%
     2 POKE 65420%,237%,176%,62%,21%,211%,132%,201%
     3 Z%=CALL(65408%)

   Note that when the BASIC is in RAM it is no longer automatically
   switched between 40- and 80-character mode.  It would require MMU
   changes to make that happen automatically; I might add that later.

   The delay before keyboard repeat is at bytes 767 *and* 816
   (standard is 70); the delay between repeats is at byte 783
   (standard is 8).  I find the following rather usable at 25 MHz:

   4 D%=255% : R%=32%
   5 POKE 767%,D% : POKE 783%,R% : POKE 816%,D%

* *Actually* fix the clock generator!!

* Add keybindings: Home = Ctrl-�, End = Ctrl-�, PgUp = Ctrl-�,
  PgDn = Ctrl-�, Delete = Ctrl-D, Insert = Ctrl-F.  This matches the
  keybindings used by the TED text editor.


Changes in release 5:
---------------------

* Up and Down keys now return Ctrl-W and Ctrl-Z.  If Ctrl is pressed
  or Scroll Lock is pressed, Left and Right return Ctrl-A and Ctrl-S
  instead of Ctrl-H and Ctrl-I.  Backspace and Tab always return
  Ctrl-H and Ctrl-I.

* Add a turbo button (sw3) that switches between 12.5 MHz and 3 MHz.
  Turbo can also be controlled with OUT (144),<turbo>.

  -> The design should be able to handle 25 MHz, but it would require
     trimming the CPU -> MMU -> SRAM -> CPU path.

* Fix the clock generator so it generates 50 Hz and 7812.5 Hz
  correctly.


Changes in release 4:
---------------------

* Handle the case where the CompactFlash card is removed from the
  socket a bit saner.

* The firmware requires masm-0.1-hpa2 to assemble (yet another bug in
  this horribly broken assembler fixed.  Really need to find a better
  one.)

* 80 character screen is now the default.


Changes in release 3:
---------------------

* 80-column mode now properly supported, including switching the BASIC
  ROM.

* The 7-segment LED is used as a substitute for the sound generator.