Hello, Still!
Argh! I wanted to go to bed, but checked a last time for any
message... and found your magnus opus! Ouch, ouch, ouch! Lots of
questions, which will lead to lots of answers which must be
explained...
Being a programmer, I will answer them from the software side. I hope
that an electronician will explain you the hardware side.
Ok. Let us begin. Be ready for some "Information Overload".
> Now, i would not try to force GSX-80 on a Windows 7 command window if technically that's not possible. Perhaps then it is possible in Puttytel or xterm. If neither of those, then it CAN be done with custom programming, after all this is 2012, not 1983! We do not have limitations.
The fundamental problem is that ANSICON is a terminal emulator
converting DEC VT-100 escape codes, while GSX-80 is a graphics system
displaying dots, lines, arcs, circles, etc. And, apparently, it is
much harder to display graphics than characters on the IBM PC. In
addition, all the GSX doc that we have deal with the original IBM PC
and XT (no mention of the PC AT). Also, I have never bothered to
investigate Windows. It is simply repulsive to me. Maybe it would be
possible to write a GSX screen driver for Windows, but I don't know.
Since everything that I own is packed in carboard boxes, I have used
(the last 2 weeks) only what is available on the Internet: grosso
modo, the 8086 version of GSX, which was running under CP/M-86 and MS-
DOS. Except my own work, I could find nothing about GSX-80, the
version that was running under 8-bit CP/M.
> It's my understanding that you are taking this apart, breaking it down, understanding it, and documenting its function(s) as much as humanly possible. Yes, we want to use that information to maximize the extensibility of the physical machine. But there is currently an opportunity to use that knowledge to help the emulation world and those who don't have physical machines to have unlimited functionality AND convenience.
Thanks to the Appendix in the "Visual 1050 User's Guide" (dealing with
its supported escape codes) and the listing of the "6502 ROM", I have
been able to disassemble DD1050.PRL satisfactorily. The reason why
this screen driver is so small is that it, essentially, spends its
time converting the (X,Y) coordinates so that the code in the 6502,
driving the screen, will do most of the job. Now, this ROM is 8KB.
This is why the screen driver is only 3KB: most of the code is away
from the TPA, in a ROM!
Personally, I have no interest in the "emulation world", but the
advantage is that it makes a nice separation of functions. So, as far
as I understand it, if someone could write a Windows screen driver
providing all the functions of the "6502 ROM", then the screen driver
(using I/O ports 84, 85, 86, and 87) would not even need to be
changed.
> To test those implementations, I used MESS with ED with the CBas compiler at original Z80 speeds to test everything. One reason i did that is because the SIMH emulator, with its blazing fast speed, is not yet ready for prime time...not ready for the extended graphics functions of GSX-80 and the DD1050.PRL driver that came bundled with the V1050 very late in the CP/M era. I think its a shame that an emulator dedicated to the preservation of digital history cannot accommodate such an important advancement to the 8-bit world...as if it never happened!
It is much easier to deal with characters than with graphics. By the
way, the IBM Clown went the "raster" way of hardware, while GSX was
written just before, when screens were not common and the main output
device was a plotter... This explains the huge resolution of GSX (32K
x 32K pixels) and also that most of its output is lines, circles, etc,
not pixels or sprites... It was designed for a kind of graphics that
is different from the current pull-down menus, which rely massively on
being able to write directly to the screen, not to draw lines on a
plotter.
> If you would help me with the implementation of GSX-80 in SIMH then i wouldn't have to go the slow poke route for development. Yes, there's something to be said for developing on a physical machine. I want to bring to the physical machine the fastest/best development tools...to turn the physical machine into some kind of hot rod the way classic car preservationists supe up their little Duce coups! But i don't necessarily want to stress my physical machine with unnecessary hours of trial and error. I would prefer to download code to the machine, and have it run the very first try. I require emulators for this, and good ones!
Well, I used my Epson QX-10 during 15 years. At the end, it was taking
15 minutes to assemble my programs, despite using a RAMdisk. Anyway,
even today, as I type this, the computer spends 99% of its time
waiting for my typing, while I think what to write.
End of GSX. Begin of PLs.
> Now, if i WAS developing on the physical machine, yes, i DO want an interpreter, and i want the BEST interpreter. I want it (the best tools) on my physical machine even if i did not use it that much for development. If you say MBasic was the standard, yes, i want that because i am 'greedy' for the best tools. If you say that Mallard was even better, i want that TOO because i am 'greedy'. I want to make the V1050 into the greatest 8-bit hot rod that ever existed! completely "loaded". I appreciate the knowledge and expertise you can bring to this project! Too bad nobody cared enough to make a CBasic interpreter. ;) I'm just kidding you. I know you considered it at one point but the speed and tools of the 16-bit world were taking over.
No. I just had not enough time and/or money to do it. In addition,
since CBASIC was the standard, back then, it was done... Well, almost.
There is an interpreter very similar to CBASIC: it is obvious that it
was "inspired" by the characteristics of CBASIC. Its name is "Tarbell
BASIC". I found and recreated several versions of it, but never had
enough time/money to "finish" it.
> I am not familiar with Mallard Basic...YET. I am familiar enough with MBasic to say that it's editor abilities are about par with the ED editor that comes stock with CP/M. That's my opinion. GW-Basic was MUCH better. That's NOT my opinion! I have complaints about the use of line numbers for every line of code, but i also understand that is unavoidable if you want an interpreter + editor combination. So even if there was an interpreter in CBasic, it would likely need an overabundance of ultimately unused line numbers (as much as 80% unused).
We had a discussion, in the comp.os.cpm Newsgroup, about the origin of
MBASIC and why it is the way it is. Because it was designed to be used
on a Teletype ASR-33: there was no screen. Hence, there were no escape
codes, too. QED! Just "control codes", since they come (too) from the
Teletype.
Tarbell BASIC is an interpreter, yet has no line numbers... Here is an
example (my newsgroup reader is set up to display fixed width chars,
so my listings line up nicely, using 8-columns tabs):
START REM SIMPLE INVENTORY PROGRAM
REM WRITTEN BY DON TARBELL
REM LAST CHANGE MADE 12-5-78
LET SEQ=0,RAN=1
LET DISKIN=2,DISKOUT=3
INPUT "ENTER INVENTORY FILE NAME: ";FILENAME$
OPEN FILE(0),TYPE(RAN),RECORD(128),DISKOUT,FILENAME$
LET SIZE=0
INPUT "NEW OR OLD FILE: ";ANS$
IF ANS$="NEW" THEN GOTO INST
GET FILE(0),RECORD(1),SIZE
INST INPUT "WANT A LIST OF COMMANDS? ";W$
IF W$="NO" THEN GOTO COMD
PRINT "LIST LIST INVENTORY ON CONSOLE"
PRINT "FIND FIND ONE ITEM"
PRINT "NEW PUT A NEW ITEM IN"
PRINT "CHANGE CHANGE AN ITEM"
PRINT "ADD ADD A QUANTITY OF AN ITEM"
PRINT "SUB SUBTRACT A QUANTITY OF AN ITEM"
PRINT "VALUE COMPUTE THE INVENTORY VALUE"
PRINT "DONE DONE WITH ALL ENTRIES"
PRINT "YOU CAN USE JUST THE FIRST 3 LETTERS"
COMD PRINT
RESTORE CTAB
INPUT "COMMAND ";CMD$
LET W$=LEFT$(CMD$,3)
FOR N=1 TO 8
READ C$
IF W$=C$ THEN GOTO HOP
NEXT N
GOTO INST
HOP ON N GOTO LISTC,FINDC,NEWC,CHANC,ADDC,VALC,SUBC,DONEC
GOTO INST
CTAB DATA "LIS","FIN","NEW","CHA","ADD","VAL","SUB","DON"
LISTC REM LIST ALL ITEMS IN THE INVENTORY.
LET COST=0
GOSUB PNTHDG
FOR I=1 TO SIZE
GOSUB GETREC
GOSUB PNTLIN
LET COST=COST+EC
NEXT I
GOSUB PNTTOT
GOTO COMD
FINDC REM FIND ONE INVENTORY ITEM.
GOSUB READPN
IF I>SIZE THEN GOTO COMD
GOSUB PNTHE
GOTO COMD
NEWC REM ENTER A NEW ITEM INTO INVENTORY.
LET SIZE=SIZE+1
LET I=SIZE
NEWC1 INPUT "QUANTITY NOW IN STOCK? ";QTY
INPUT "PART NUMBER? ";PN$
INPUT "DESCRIPTION? ";DES$
INPUT "COST OF ITEM? ";CI
GOSUB PUTREC
GOTO COMD
CHANC REM CHANGE AN ITEM.
GOSUB READPN
IF I>SIZE THEN GOTO COMD
GOSUB PNTHE
INPUT "JUST CHANGE QUANTITY? ";W$
IF W$="NO" THEN GOTO NEWC1
INPUT "NEW QUANTITY? ";QTY
GOSUB PUTREC
GOSUB PNTLIN
GOTO COMD
ADDC REM ADD TO STOCK.
GOSUB READPN
IF I>SIZE THEN GOTO COMD
GOSUB PNTHE
INPUT "ADD HOW MANY? ";J
LET QTY=QTY+J
GOSUB PUTREC
GOSUB PNTLIN
GOTO COMD
VALC REM PRINT THE COST OF THE INVENTORY.
LET COST=0
FOR I=1 TO SIZE
GOSUB GETREC
GOSUB FINDCOST
LET COST=COST+M*QTY
NEXT I
PRINT "TOTAL COST = $";COST
GOTO COMD
SUBC REM SUBTRACT A QUANTITY FROM AN ENTRY.
GOSUB READPN
IF I>SIZE THEN GOTO COMD
GOSUB PNTHE
INPUT "SUBTRACT HOW MANY? ";J
LET QTY=QTY-J
GOSUB PUTREC
GOSUB PNTLIN
GOTO COMD
PUTREC REM PUT A RECORD OUT TO DISK.
PUT FILE(0),RECORD(I+1),QTY,PN$,DES$,CI
RETURN
GETREC REM GET A RECORD FROM DISK.
GET FILE(0),RECORD(I+1),QTY,PN$,DES$,CI
RETURN
PNTHDG REM PRINT THE HEADING.
PRINT
PRINT "QTY";TAB(8);"PART NO.";TAB(19);"DESCRIPTION";
PRINT TAB(40);"COST";TAB(49);"EXT COST"
PRINT
RETURN
PNTLIN REM PRINT ONE LINE ITEM.
PRINT QTY;TAB(8);PN$;TAB(19);DES$;
GOSUB FINDCOST
PRINT TAB(40);M;
LET EC=QTY*M
PRINT TAB(49);EC
RETURN
READPN REM INPUT PART NO., RET WITH ENTRY #I.
INPUT "PART NUMBER? ";W$
FOR I=1 TO SIZE
GOSUB GETREC
IF PN$=W$ THEN RETURN
NEXT I
LET I=I+1
PRINT "ITEM NOT FOUND"
RETURN
PNTHE REM PRINT HEADING, THEN ENTRY.
GOSUB PNTHDG
GOSUB PNTLIN
RETURN
FINDCOST REM FIND THE COST (M) OF AN ITEM (I).
LET M=CI
RETURN
DONEC REM DONE WITH PROGRAM, QUIT.
PUT FILE(0),RECORD(1),SIZE
CLOSE 3,FILE(0)
STOP
PNTTOT REM PRINT TOTAL COST.
PRINT
PRINT TAB(19);"TOTAL COST:";TAB(49);"$";COST
PRINT
RETURN
END
Not too bad, eh? Especially since Microsoft never managed to do it...
> I understand there were converters that could transform MBasic and/or Mallard into CBasic so that it could be compiled to an .INT file, or perhaps even to a stand-alone .COM under CBASIC-80. From a developers point of view, without the aid of a really good CBasic interpreter, that would be the way to go, and sounds like it was the way you went when you were dealing with available tools in 1983 terms.
To be more precise: it is a MBASIC-to-CBASIC *Compiler* (not "CBASIC"!
Also, "CBASIC-80" usually means the 8-bit version of CBASIC. "CBASIC
Compiler" was provided as a CB80 COMmand file, so most persons use
CB-80 to talk about it, the way persons say M80 to talk of
"Macro-80"). Version 2 of CBASIC Compiler, the one sold in Europe for
the Amstrad micros in 1985/86 has graphics commands for GSX.
> As an unnecessary but interesting project, i might be willing to code the CBasic interpreter that you didn't...unless you really think that Mallard is the way to go (for rapid development) in 1983 terms, for CP/M 8-bit machines. To do that i would have a LOT to learn, and it would take months to years. To help me, i have someone's dissembly of MBasic 5.21. Its in the Google Drive library that i linked you to. I was not even aware there was a version 5.29 until you mentioned it. Did you contribute the binary or the source/dissembly or both?
It all depends if you like BASIC. Some persons will tell you that
Turbo Pascal is better (but seems dead). Others are fanatics of the
Forth language, which is pretty impressive but I have difficulties
with it.
As for disassemblies of MBASIC, I have done 4KB, 8KB, 12KB
("Extended"), and stopped at 4.51 for lack of time. Also, except
collectors, it seemed futile to disassemble all of its versions, since
Mallard BASIC is much better. If you want to learn a little bit more
about it, have a look to:
http://www.fvempel.nl/basic.html
(There, you will also find a dozen of GSX programs...)
For the ultimate reference, go to:
http://www.fvempel.nl/Pcwsbas.htm
> I am not so partial to the V1050 that i will only use tools that came bundled with it. I DO want the best tools that it can possibly run running on it! At the same time, to save the hardware ware and tear, i want the best emulator tools, and i just can't believe that SIMH, as good as it is, no one has stepped up to implement GSX-80, the most powerful business graphics ever made under CP/M!
Digital Research made it run under CP/M-86 and MS-DOS. But, since
then, nobody cared to make it run under Windows... (only the source
code of the system and its drivers is available, not the application
programs. So, if there was a screen driver for Windows, DR Graph would
be missing, unless we used the MS-DOS version. But, then, it already
runs in a "DOS Box" under Windows... So, why care about writing a
Windows driver?)
(Your message was so long that Google cut it...)
Ok. One hour to type the above. Time to go to bed.