by Richard F. Drushel (drushel@apk.net)
It's the end-of-semester crunch time here at CWRU, and all the students in my Autonomous Robotics course are spending long hours in the lab...along with me. I've still managed to do some ADAM-related stuff, but I don't have any complete stories for you, like I did last week with the VDP color palette discussion. Thus, this is more of a progress report than a coherent article, so please bear with me.
I finally traded some E-mail with Marcel de Kogel (m.dekogel@student.utwente.nl) about his ADAM emulator. He was looking for some information about ADAM floppy disk formats, and I sent him the x86 assembler source for the floppy disk I/O module of my ADAMserve file server. He said that the information was useful, but that it was so hardware-specific that it would likely not be useful for his emulator (i.e., not every computer has compatible floppy drive hardware). He also had a couple questions relating to ADAMnet I/O; I referred him to Chris Braymen (70057.2035@compuserve.com), but Marcel said he had already contacted him but was still waiting for a reply. Finally, Marcel was looking for information about (non-ADAMnet) serial and parallel ports, as well as the ADAMlink modem. I have all this information in various forms, I just need to put it together into a brief, coherent package. Marcel, bear with me :-)
As for the emulator itself, I don't have it yet, and have been avoiding it because it's too interesting and I have other stuff that people have been clamoring for me to do. Everything I've heard about it, though, has been very positive.
I want to correct my previous misattributions of the MS-DOS emulator of the ColecoVision, COLEMDOS.EXE. In previous issues of TWWMCA, I have referred to it as Marat Fayzullin's (fms@freeflight.com) emulator. I have since learned that Marcel de Kogel is the true author of COLEMDOS.EXE; he started with Marat's MSX emulator code, but in the process of porting it to MS-DOS, he rewrote all of Marat's code. I apologize to Marcel de Kogel for this misattribution.
While FTPing my floppy disk I/O code, Marcel also happened to grab the 24-bit color TMS9118.TIF file I put up last week.
TMS9118 VDP color palette, recalculated from TI Data Manual values
He commented that, like me, he initially thought that the colors were too washed-out, but when viewed side-by-side with his MSX's TMS9938 VDP, he was impressed by the color match. Marcel feels that the greens are possibly too bright. Possible sources of the difference are:
NTSC versus PAL video;
composite video versus color difference signals; and
errors in my RGB derivation.
I have access to a 24-bit framegrabber in my lab at CWRU. Perhaps I could bring in an ADAM, make a color bar test pattern display, and grab the frames to look at the RGB values.
The ADAMnet question Marcel has for Chris Braymen pertains to block reads from ADAMnet block devices. The code for the EOS _READ_BLOCK function makes two calls to the _READ_1_BLOCK; the corresponding _WRITE_BLOCK function makes only one call to _WRITE_1_BLOCK. Upon first inspection, this behavior sounds weird. Upon much further reflection, it's *still* weird. It doesn't make sense...but the second call to _READ_1_BLOCK is *necessary* for the block to be transferred. At ADAMcon 05 in 1993, Chris Braymen and I were playing with his ADAMnet 256K static RAMdisk, and we commented out the second CALL _READ_1_BLOCK (and associated code) with NOPs. The activity light would blink on the RAMdisk, but the requested data would not appear in Z80 address space. A second manual call to _READ_1_BLOCK, however, and the data appeared in Z80 address space.
Thanks to Chris Braymen, I have a copy of the original Coleco source code to the ADAMnet master 6801, the tape drive, and the daisy-wheel printer. I know that once I tried to work through the master 6801 source to identify the source of this two-read requirement, but didn't find anything. I decided to look again. As I started through the code, I discovered (or rather, was reminded of something I had forgotten) that Chris' original source listing was missing 2 pages from the master 6801 code. The missing pages weren't in a critical part of the code; in fact, there were parallel sections in the tape and printer source which seemed to duplicate what was missing.
The challenge of reconstructing the 2 missing pages of the listing was too attractive: I spent an evening doing it. Basically, the symbol table and cross-reference table at the end of the listing told me the line numbers on which certain symbols were originally defined. By analogy with the parallel sections in the tape and printer source, I was able to reconstruct probable comments; in fact, because the 2 missing pages were mostly all comments, I was able to account for every missing line number in the listing. For Chris's benefit, and for that of anybody else to whom he may have given copies of the listing, here's my reconstructed version. I'm confident that all but possibly a couple lines are exactly the way they appeared in the original. Warning: some of the lines are longer than 80 columns.
FILE: D_MMR:pADAMM HEWLETT-PACKARD: D_MMR (c) Coleco 1983 Confidential Thu, 23 Jun 1983, 0:17 PAGE 2
LOCATION OBJECT CODE LINE SOURCE LINE
26 ****************************************************************
27 * *
28 * MODULE NAME: *
29 * *
30 * D_MMR *
31 * *
32 * FUNCTION(S): *
33 * *
34 * 1. TO DECLARE THE DATA AREA "NIM_BLOCK." *
35 * 2. TO DECLARE THE D1_MODE_WORD. *
36 * *
37 * NOTES: *
38 * *
39 * 1. NIM_BLOCK IS USED AS THE INTERFACE BETWEEN THE *
40 * MEDIUM ACCESS CONTROLLER AND THE RESIDENT APPLICATION *
41 * PROGRAM. *
42 * *
43 * 2. THE INSTALLER IS RESPONSIBLE FOR LOCATING THIS DATA *
44 * MODULE SO THAT THE LAST BYTE ENDS AT LOCATION 127 (DEC). *
45 * *
46 ****************************************************************
....
FILE: D_MMR:pADAMM HEWLETT-PACKARD: D_MMR (c) Coleco 1983 Confidential Thu, 23 Jun 1983, 0:17 PAGE 3
LOCATION OBJECT CODE LINE SOURCE LINE
48 GLB D_MMR
49 GLB D1_MODE_WORD
50 GLB NIM_DMA_BLK
51 GLB CNFG_WORD
52 GLB A_SIGNAL
53 GLB A_SIG
54 GLB MEM_PTR
55 GLB MEM_PTR_HI
56 GLB MEM_PTR_LO
57 GLB MEM_LEN
58 GLB MEM_LEN_HI
59 GLB MEM_LEN_LO
60 GLB MEM_SIGNAL
61 GLB MEM_SIG
62 GLB EXPECTED_NODE
63 GLB NXT_STATE
64 GLB TIMEFORRESPONSE
65 GLB INDEXTOMEM
66 GLB TIME
67 ORG 83H
0083 68 D_MMR:
69 ***************************************************************
70 * *
71 * DATA_WORD: *
72 * *
73 * D1_MODE_WORD *
74 * *
75 * FUNCTION: *
76 * *
77 * CONTAINS THE STATE OF SEQUENCER PROCESSING *
78 * *
79 ***************************************************************
80
81 DATA
82 ORG 90H
0090 83 D1_MODE_WORD RMB 1
....
Now that I've finished my detour, I hope that I can complete my original objective of going through the master 6801 code and figuring out why the two reads are necessary.
To those in the States, I wish you all a happy and safe Thanksgiving; eat lots of turkey and other good foods.
See you next week!
*Rich*
Next Article
Previous Article
TWWMCA Archive Main Page