01 September 1989

The content below is simply a reformatting of text as published decades ago by 9640 NEWS. The opinions and views expressed are not my (Jedimatt42) own. The content is published here to preserve and make accessible the technical data contained within.

Taken from the disk distributions archived at http://ftp.whtech.com/Geneve/9640 News disks v1-3/pc99 disks/

NEWS4

Geneve News
Vol 1 #4

We are quickly approaching the end of Vol 1 and will soon begin Vol 2. Each volume of 9640 News will have 5 issues. In the next issue of 9640 News, I will have a detailed list of those people who for one reason or another have had their subscriptions extended. A normal subscription has been $25.00 for U.S. delivery, but some other areas have been just as cheap to deliver (Canada) and if you exceeded a $25.00 payment, I will credit you with an additional issue by checking each individual's status. If you would like to go on and mail in payment for Vol 2, I would appreciate it so that I can make plans and find out everybody's interests. Suggestions or comments regarding 9640 News are always welcome, be they critical or praise as I want to do my best for those of us using a Geneve. Subscriptions may me mailed to:

Beery W. Miller
5455 Marina Cove #1
Memphis, TN 38115

$25 (U.S. delivery)
$30 (Foreign deliver)

REAL NEWS

Since the last issue, quite a few things have been happening. A 'final' version of advanced basic has been released and I must say that I am impressed with what I have seen it do. Support for A/L subprogramming was extensive although one can not combine the two into one single program file. You must still use the CALL LOAD statement to bring the code in. Lou has made comments that the majority of EA references were available, however he recommended not using anything referencing the VDP memory as it would actually write over program space as the Geneve really had only one kind of memory when in Advanced Basic (unless you REFerenced VSBW, VMBW, VMBR, etc.). As it stands now, there is over 133000 bytes of free memory. That translates into almost 130K of memory. It must be remembered too that a 130K program is not feasible as you must also include string space, etc. that is dependent upon each program. Still, it is MORE than we ever had with anything else and it is here to use now.

Also since the last issue, Ron Walters has come out with a nice program written in 9640 Fortran that tests all available memory and displays the memory map graphically. This is by far the most impressive MDOS Graphics related program. It was especially developed to test the expanded memory cards that Bud Mills has developed in conjunction with Ron Walters for the Geneve. The version that has appeared on the telecommunication networks is V 0.9 as to get V 1.xx requires the purchase of a memory expansion card. I would highly recommend running V 0.9 to get a feel for what can be done graphically. I am unable to distribute this program due to the author's request but you may find it on most BBS's where a 9640 Database is located.

I have also updated MT9640 to now include formatting 2880 sectors if you have the appropriate hardware. I am attempting to patch the operating system to permit the 80 track option for all disk controllers, however that is not available yet. MT9640 will be found on this disk without any documentation to conserve space. Thanks for DS/QD information goes out to Andrew Lee that sent in the necessary information for sector 0 and sector 1. As I do not have a system to test it on, it should work as it was programmed blindly, but consistent with the other formatting options.

I am very much interested in how many people have drives that support 80 tracks but have only a TI or CorComp disk controller. I have modified the operating system of Version 1.14A and Version 0.95H that permitted formatting up to 2880 sectors (should work to 1440 max on TI) with limited capabilities. I am debating on writing a utility to disk 'pack' up to 8 disks on a CC formatted disk if drive support was worth the need. If a program of this type is worth it to you, please write to me and let me know you are interested in this utility and can even use it on your system. If you own a HFDCC, please don't respond as sooner or later we will have that support anyways. Hopefully sooner than later.

From reading the above paragraph, you will notice I said V1.14A of MDOS. This was the version that 9640News distributed in November 1988. There is now a Version 1.14F dated September 1989 that has been modified to use more of the DSR status returns, some math library functions debugged, and the video library has been updated to reportedly work with Advanced Basic. Version 1.14F will not work with a hard drive controller card. This 'final' version will probably be the final MDOS seen for the floppy controller people, unless some bugs are located in the MDOS libraries or elsewhere. The hard drive version is currently at 0.96H and lacks the full support needed for accessing floppies with the HFDCC. The support for the HFDCC as I understand it resides with Lou Phillips and Myarc and not Paul Charlton. Paul was not in charge of handling the DSR routines, except to incorporate it into the operating system as new routines were written. Paul's work is essentially finished and I guess he will be writing 'useful' software now. [As some may know, he is working for a major company as a programmer on another 'system' now and his time is split accordingly. We wish him all the luck with his talents as not many people can claim to have almost single handedly designed such an operating system, with credits to Boone, Faherty, Hoddie, and others making their significant contributions.]

[Editor's Note: Within the past week, it has been learned that V1.14F and 0.96H have a bug when working with RAMDISKS. This relates to both the Geneve and HRD. An extraneous line entered into the source code that Paul Charlton finally located and in the near future, a version 0.97H and V1.14G are most probable. I am still using V0.96H even though I have a HRD as the only time I have seen the bug is when I tried to save MT9640 back out to the ramdisk.]

For those of you possessing Clint Pulley's PATCH program, a patch for MDOS V 0.95H is available regarding the search for a DSK1 emulation file on the hard drive. This bug prevents the physical drive number one to operate while in GPL mode. To make the patch and unpatch program, here are the following two programs to be written as a text file to solve the bug. If you don't own the HFDCC and/or you are not using MDOS 0.95H, do not make this patch.


=================================== (This is the patch program) *patch DSK1.EMULATE off a 7 409e p 47a0 =================================== (This is the unpatch program) *patch DSK1.EMULATE on a 7 409e p 4798 ===================================

I have just recently received from Asgard Software, Page Pro 99 that is a fantastic program. Two versions were on the disk, a 4A version, and a 9640 version that incorporated it's features. I had initially planned a big review on the 9640 Version as I thought it was going to be much different than the 4A version. As it was, the only 'enhancements' for the 9640 version is apparently in speed. It is not 80 columns and you must page over 40 columns at a time. Due to the programming structure of the program, I doubt very seriously we will see a GPL implementation of this program in 80 columns. We don't really have enough VDP memory that can be mapped in at one time and still make the program run out of GPL. If the author goes with a MDOS style program, then the amount of VDP memory is available without any addressing problems. This program is still one of my favorites and does what I need. I have heard comments of a possible future 9640 specific version, but only time will tell. I would still buy the program again. I highly recommend this program for anyone wishing to perform a page by page creation of text/graphics.

Just recently released by Barry Boone, is Version 1 of EXEC. This could be the utility everyone wants more than anything else. It permits running EA5 programs from MDOS mode without loading GPL. As is, the file is 16 sectors and contains the necessary patches to run 95% of all EA5 programs. I have personally run Page Pro 99, TI-Base V2.01, Telco, My-Word (SD command locks system up), MDM5, Archiver III, and many others. To date, I have not found a program that would not run. Congratualtions goes to Barry with this program (it is Fairware). Perhaps, EXEC will even run the future PRESS word processor. How about it Charles? (Ed Note: Version 1.1 is now available that removes a problem that may have occured with boot-tracking on that may have been seen in TELCO).

In the past two months, several of you already know, but I have joined DELPHI as 9640NEWS, my username. If anyone needs to make contact with me thru that system, you are more than welcome to EMAIL me programs for 9640 News as reviews, distribution, etc.

Also, recently being on Delphi, I learned thru Ron Walters a modification to the HRD (16 bit), if you have problems using it with MDM5. What needs to be done is to clear the 16 bit DSR space (actually only the first word) on the HRD which is at CRU address 1600. The easiest way to do this is in GPL with Debug, as follows:

1) Enter DEBUG and type "M 8002" at the dot promt, the contents should be "0736", change this to BA36 (this sets the memory mapper to the DSR page BA).

2) Enter "C 1600" at the dot promt, then respond by entering "0001" to turn on the HRD (the light on the card will turn on).

3) Enter "M4000" to look at the first location of the DSR on the HRD, Zero this by entering "0000".

4) Enter "C 1600" and then enter "0000" to turn the card off.

This should allow MDM to load successfully and comes by compliments of Ron Walters.

Also new, is GETKEY and GETSTR by Barry Boone that has appeared on the scene. Unfortunately, I am unable to distribute those files, but check with you local BBS or Network and you may be able to locate those files. What they provide for, is more control within an AUTOEXEC file that permits characters and strings to be passed into the argument list. If you already have GETKEY, you may use it with the enclosed AUTOEXEC file description (from MDOS 0.96H) and you can have a simple MENU program that shows some further use of batch file handling. Note, with Barry Boone's EXEC program (at least with V1.0), at program termination, batch file execution halts. With other MDOS contained programs, the AUTOEXEC batchfile will remain in an endless loop until you break execution with a control C.

I have also enclosed a short program (2 sectors) that permits you to frame text in a window-like screen. What I have done is redefined some of the characters that are not used as often into border displays. If you decide to user BORDERS, you must remember that unless your MDOS program does a reset of graphics mode, or character redefinition, you should use a MODE 80 or MODE 40 in the batch file to reset the characters before running the program or you might have some semi-funny displays. If you use GETKEY or GETSTR, then with the AUTOEXEC file I have provided should show some of the versatility. Just play with it until you find your right combination. Source code is provided and you may add on to the program. If you add other graphics, please forward your final program with source to 9640News and I will enclose it in a later issue.

It looks like we again have some further enhancements to XHI that make this a further alternative to Advanced Basic. We now have not only the ability to display MYART pictures from Extended Basic, but we also have the ability to use another utility to PRINT them to most all printer types. Details and instructions are enclosed. The file XHI-ARK is Version 3.41 and includes HARDCOPY, English docs (German docs available on request), and X80 all wrapped up together. Enjoy.

Al Beard seems to be progressing with his 9640 Fortran. This issue demonstrates some of Al's talents with his TRANSFORM program that will convert text to diffent formats. I have used this program several times myself and have found it quite useful in working with text that was formatted with MS-DOS based machines that contained in-line tab characters and other stuff that makes it difficult reading on a 9640 or even a 4A. Al also goes on to include the source code for the program and a flow diagram showing how he designed the program. I found learned quite a bit of 'other' ways to program and of logic by just looking at how he worked the program out. I guess that is why he wrote 9640 Fortran, and I reviewed it. If you haven't got the program yet, I highly recommend it on your list as it is indeed a tool you should have. Quite a bit can be done rather easily with his software package.

What has happened to Clint Pulley? After Clint's sorta final release that permitted floating point in c99, Clint seems to have 'disappeared'. What does he have cooking next? Only time will tell. There has been quite a bit of demand for a full C compiler and I for one would like to see it's implementation, but I would say that is still down the road if Clint can even handle the project.

As most people have already picked up reading this column, Barry Boone has joined the Elite users of a Geneve 9640. As you may have well guessed, he is jumping headfirst into the computer as we have already seen three fine programs in the past six weeks he has written, EXEC, GETKEY, and GETSTR. Look for more fabulous programs as he is a programmer with many talents. He also has developed and I believe will release commercially a program for 80 column devices (I assume works on the 9640 too) permitting the display of My-Art and Gif pictures on the 4A with 80 column capabilities. More information on that should surface soon.

In a recent conference with J. Peter Hoddie, Peter mentioned that V1.21 and V1.22 of My-Word are the final releases we will see. Peter also mentioned that he too has moved to the West coast in the vicinity of Paul Charlton and is working for Apple. In his recent conference, he mentions that Genial Computeware is dissolving and being renamed JP Software and is picking up with better service and better products as he has joined forces with Paul Charlton to produce software. A question was put forward regarding any new updates and Peter responded with not under the My-Word name as Myarc has a copyright on it (the name), but 'perhaps' in the future from his company. I think I could see a smile on my monitor when I read that text.

For those owners out there, there is now an EPROM upgrade for the old winchester personality card. Cost is just a couple of dollars above that of the EPROM and will provide support for the winchester personality card just like the current Myar Hard and Floppy Disk controller from MDOS. Paul Charlton decided he wanted his controller to work too and apparently sat down and wrote the code necessary to use it into MDOS. However, MDM5 can not access the system and you are still required to use the Extended basic programs if you want to copy/move/create/ etc. on the GPL side. At present, I can't locate the address of the individual to order the EPROM (just a couple of dollars over EPROM cost), but if you drop me a note and require the information, I will leave a message on DELPHI to find that information again.

Almost at the last minute before preparing the final 'notes' in this issue of 9640News, a program from Australia arrived at my doorstep from a person wishing to submit a program to be included in 9640News. That person was Klaus Gebecke and he has written one of the nicest utilites to date from MDOS that supports MYART pictures. The program permits the ability to overlay MYART pictures and to move (somewhat) them around while cropping and mixing pictures. I highly recommend reading the docs I created as the program is at first very easy to be confused on how to operate. Once you know what the program is expecting, you can do many, many things with it. I still have not figured out some of the functions, but I am sure someone will, if not, I hope Klaus will provide a detailed set of docs from which everyone can make use of all the features of his program and provide them to us in spanish, english, and german if he can find the time and I will provide it in the next available issue. It should also be noted that on the first display screen, you should adjust your monitor to make sure you see the expansion box. At first, my monitor's colors were just slightly out of adjustment and bringing it into adjustment, made the screen display that much more FANTASTIC.

Klaus also provided another program permitting the ability to display all 255 colors on the screen at one time along with the decimal/hexadecimal notation for color selections if you want to program. A very handy utility. Thank you Klaus.

JP Software has now formally released limited copies of GENPROG (available now without all of the docs) or you can order and request the 'final' docs when MDOS is complete. Requesting GENPROG before the completed docs requires an additional $5 due to shipping costs. My first impressions of GENPROG are varied. It is indeed the best Assembly language compiler to date. Paul Charlton covered so many options in his Assembler/Linker/ and other Utilities that in the hands of even the small programmer, we could see some fantastic programs. Currently, the 4A and MDOS libraries are incomplete, along with much of the MDOS XOP's that many wanted to know. With what information the docs contain, you can see how Paul Charlton created this program out of necessity so that he could compile the Geneve operating system and all of it's requirements, and then create SYSTEM/SYS on the Geneve that many thought was not possible. Let me tell you that it can be done from what I have seen in his docs. The thing that impressed me the most has been GenASM (assembler). It is FAST, FAST, FAST!!!! When I compiled a program that was 16K on a ramdisk, it would normally take about 5 minutes from MDOS to compile. With GenASM, I can load GenASM, assemble those files on the ramdisk, save the object file to the ramdisk, use GenLINK to convert it to program image, and save that back out in no more than 30 seconds. That is FAST in my book. I can't even get a glass of water in that length of time. An ad is enclosed elsewhere on the disk for some other limited information and ordering information. If you are an assembly language programmer, and want to boost your programs, this is a MAJOR step in the right direction.

And I guess with that note, I will end this column and leave everyone to unarchiving all the files on this disk. Enjoy until the next issue arrives which will be towards late December/January. I am currently attempting to write a "GEME" type programming enviroment. It will take some time before I have enough code written so that I can test out to see if what I am doing is possible, so have your fingers crossed.

Until next issue.......

NEWS4B

News 4 Part B

I have now made available the MT9640 source code in it's entirety with docs on making it run from QDA instead of GenPROG. Not too difficult, but future versions of MT9640 will require GenPROG to assemble if you obtain the source code. In addition, I have removed what looks to be the last of the bugs associated with the AFTERHOURS BBS source code making it fully 80 columns with an 80 column editor seen on the System Operator's end. It will (at least I think) run on any 9938 Chip device that also has a GramKracker. You do need to contact the author of the program for the additional source files.

Also, I am opening up a contest with a prize. I recently obtained an Apple monochrome monitor (used, but in good condition) that is excellent on the Geneve for 80 columns. The best program that is submitted in Vol 1 #5 will receive the monitor (shipped free to anywhere in the world). The best program will be determined by the subscribers by voting on their most favorite and best program and sending a letter after they receive Vol 1 #5. Hopefully, this will generate more and better programs to be released thru 9640News and get some people out of their chair.

Also, as I am still working on several programming projects of my own, the next issue of 9640News will be seen in late January or early February. It may be a little sooner, or a little later as it depends upon how 'quickly' the information comes in.

I would also like to mention that the SPECS9640 disk has been updated to also include information regarding using two different types of mouse's on the 9640 and their wiring diagram. I wrote the low resolution article (and it took some doing as I had to take the mouse apart and look at the board to figure most of it out) and the other article is on a high resolution mouse (the author of it has later told me wish he had my low resolution mouse) that forces you to move the mouse twice the distance to move the same distance on the screen. And also, XHI-V3.41 also includes the german documentation if anyone is interested.

Also, I will be at the Chicago Fair this November 4th, so please stop by and say Hello. Until next issue......

QUESTIONS

Questions Regarding 9640 Software

Question (Dennis Mattson): I need some info on converting TI-Artist to run on the Geneve.

Answer: Dennis, in the November 1987 issue of Micropendium was a detailed article describing the fix you needed. To fix TI-Artist, only two changes are necessary. On the first sector of the file ARTPT2, change byte 3, >06 to >00. In the 28th sector of ARTPT3, change byte 121 from >10 to >00. The article also goes on to describe a Mouse DSR patch to use the Myarc Mouse.

Question (Richard Broad): I am in the throes of whether to buy a Myarc hard drive, power supply and controller card, a Horizon Ram card or getting my Myarc 128 card updated and altered for the Geneve. I guess all I really need is more memory, although a hard drive would be nice. Beery have you ever tried to back up a Myarc Ram card? You mention adding the 32K chip (0 wait state) to the computer. I have been toying doing that to but have not been able to get any reasonably priced rams. They want $25.00 and $30.00 here (Canada). What are they selling for down there?

Answer: Richard, currently the most memory any program that has been written that can use it is Hyper Copy. Without TIMODE enabled or a Ramdisk partitioned, the 32K (0 wait state) is adequate to fullfill even that programs requirements. The only advantage you have of buying more memory is if you wish to partition a Ramdisk from memory or have a larger printer spooler, or TIMODE enabled. Except for the spooler, either batch files or a hard drive would solve this and shorten any time to a second if written correctly. If you have $500 you are wanting to spend and trying to decide which route to go, I suggest the hard drive route. It is immediately usable and you do not have to wait for something to be written that 'can' use that additional memory. The lowest prices I have seen for the 32K chip has been from Bud Mills and he is in the neighborhood of $30.00 (check with him before ordering). That 32K chip addition provides some faster memory and also with HyperCopy the ability to read an entire DS/DD disk contents into memory. Without the additional chip, about 3 tracks of the disk could not be loaded into memory. Backing up a Myarc Ram Card, (when I had one), I used DM1000 on a 4A system. I have not used one since I bought the Geneve and I sold my 512K Myarc card to support the purchase of a Hard drive system which I prefer, although I do have a Horizon Ramdisk that is invaluable to me. It retains it's memory even when the computer is down, unlike adding additional memory to the Geneve. I hope this gives you some insight.

Question (R.K. Halvorson): Have you been able to run any existing XB programs in Advanced Basic? I haven't!

Answer: I have been able to run quite a few myself. Even a lot of programs with assembly source code that is pulled in with a Call LOAD statement. Versions of Adv. Basic after 06/29/89 have been nearly bug free.

Question (Klaus Gebecke): How can you change graphic modes without clearing the screen?

Answer: Klaus, I am afraid I have not been able to accomplish that myself either. What appears to be happening is that the XOP call rebuilds all the tables and character definitions, etc. from the operating system and wipes everything clear. If it is possible, GENPROG, from Paul Charlton that is being released should detail how it can be done. Currently, I have not received mine by mail yet to make any comments.

Question (Klaus Gebecke): Why now only 120K of ramdisk space when in TI-MODE when there is 512K or Ram?

Answer: As written, MDOS comprises around 100K to 120K depending upon the floppy or hard drive versions of the operating system. Speaking at the level of the 120K operating system, that leaves a 512K - 120K = 392K of memory. The GPL side of the 9640 requires 64K Gram and 64K Ram plus another 8K of banked ram at >6000 to >7fff. That totals to 64K + 64K +8K= 136K. Taking 392K - 136 K leaves 256K of ram. Another 40K is required to actually load the GPL Interpreter on the MDOS side before it simulates a 4A which leaves 256K - 40K = 216K. With a current MDOS 0.96H, you don't want to carry over 90 K into TIMODE and that leaves 216K - 90K = 126K. Another 16K is required for a print spooler that is automatically set up on initialization of the system leaving 126K - 16K = 110K. Where that memory goes, I don't know. Perhaps Paul can answer that in the next issue? How about it Paul?

Question (Klaus Gebecke): Where is the pattern in the D.O.S.(DIR).

Answer: I am assuming you are referring to the screen image tables, character table, sprite attributes, sprite patterns, etc. That is in the VIDeo library op >37. If R1 is a pointer in user data, the table is copied to the specified location with the following info.

CTABLE  DATA 0,0
PTABLE  DATA 0,0
SCRIMG  DATA 0,0
SPRATT  DATA 0,0
SPRPAT  DATA 0,0
SPRCOl  DATA 0,0

I hope this answers you question. I will be sending you a disk with more information on the XOP calls for the video library to hopefully help you more with your programming.

FOR-NEWS

BUENOS AIRES, SEPTEMBER 1989

HELLO 9640 NEWS

FROM ARGENTINA I SEND THIS 2 PROGRAMS FOR THE GENEVE, LOADING DIRECTLY IN DOS. YOU CAN MAKE PUBLIC WITH YOUR DISC-NEWS.

MIXPICTURE: LOADED EN DOS, CALL: MIXPIC MIX GRAFIKSCREENS TAKING THE BLACK COLOR AS TRANSPARENT EN LOW RESOLUTION, MODE 7, 256x192/212 PIXELS x 256 COLORS WITH SCROLL YOU CAN CENTER THE INDIVIDUAL SCREENS WITH SPRITES CAN SET POINTS TO REFERENC VARIOUS SCREENS LOAD AND SAVE ON DISK

DEMO OF COLORS: LOADED EN DOS, CALL: NUMCOLOR PLACE ON SCREEN THE 256 COLORS WITH NUMBER IN HEX AND DECI

I WRITE THIS PROGRAMS WITH QDE,QDA AND QDL ONLY USE XOP'S FOR INIT,I/O AND KEY


ANOTHER THINGS....

    XOP >02     SET CURSOR POSITION
    R1 = ROW NUMBER
    R2 = COLUMN NUMBER

PLEASE PUBLIC A ACTUAL LIBRARY OF XOP'S (ONLY ARE TESTED)


?????????

HOW CAN CHANGE MODE(WITH XOP'S) WITHOUT CLEAR SCREEN?

WHERE ARE THE PATTERN IN THE D.O.S.(DIR)?

WHY NOW ONLY 120K OF RAMDISK EN TI-MODE, WHERE ARE THE 512K?


MY NAME AND ADDRESS:

KLAUS DETLEV GEBECKE
BLANCO ENCALADA 5271
1431 BUENOS AIRES
ARGENTINA

THANK YOU

ABASIC-REV

ABASIC V2.99

Comments on 09/26/89

Well folks, Advanced Basic V2.99 has now been released and has resolved the majority of all bugs. A problem now and then comes up that is associated with cataloging the hard drive from a running program, but other than that, I feel it is pretty much bug free. Preliminary testing on my part has found that it runs smoothly with CSGD V#3 and Graphics Labeler V#3. On other testing, I have found it runs smoothly with quite a bit of assembly code that is loaded via a CALL LINK statement that DID NOT VIOLATE some rules of the Editor/Assembler Manual. If the assembly code has it's own DSRLNK, or it's own Video Utilities, problems will most likely arrise as special code was designed with Adv. Basic to handle the DSRLNK, and other utilities IF they were REFERENCED. I am quite pleased with the capabilities that Myarc has produced. It is now time for folks to do something with Adv. Basic and make use of these new features. The ease of using a mouse (and it doesn't even have to be in a running program....even at the prompt once it is activated), could permit some highly graphic screens if someone tackles it. With blinking, all the various video modes and colors, the ability to load and display MYART pictures, and countless other new features, should make for some interesting programs. If it doesn't, everybody is waiting for someone else to write a program and everyone is going to lose. I ENCOURAGE everyone to convert some of their favorite basic programs into an ENHANCED advanced basic program (and submit to 9640 NEWS if you wish) with mouse and enhanced video features to increase the amount of adv. basic programs available.

I have some other 'sorta hidden' features of Adv. Basic that have not been revealed until now. At the Adv. Basic prompt, type KEY ON and you will see a display appear at the bottom of the screen. Currently it is inactive. KEY OFF removes the display. Another 'feature' I found is that if you type MOUSE ON from the command line, the right button on the mouse turns into an additional key. If/when you find additional quirks to Adv. Basic, pass them on and I will include them in the next issue.

ADS

DISkKASSEMBLER Ver. 2 for 9640

Allows you to disassemble DIS/FIX 80 or Program Image files, containing 9905 Assembly code, right off the disk, or to disassemble memory.

Outputs 80 column display to the monitor, and to printer or disk file, complete with source code, opcode data, text and address. Up to 3 output devices can be on simultaneously and each can be toggled on and off at will.

DIS/FIX 80 code can be disassembled line by line from the disk, or loaded in its entirety, without limitation into a simulated memory block with resolution of all REFs (with previous load of a REF/DEF table) .

Standard EA5 or MDOS chained program files can also be loaded all at once in- to memory for disassembly of a complete program .

Generates fully labeled source code with up to 1852 labels on second pass, with EQUates and a symbol table.

Up to 30 Data/Text blocks can be assigned, 30 data blocks following subroutines. Automatically generates blocks for BLWP vectors, and for large blocks of same data. The latter can be skipped on printing.

In almost all cases can be reassembled with little, if any, editing.

Disassembles all device DSRs with CRU base selection.

Features ability to disassemble ANY 9640 physical page.

Price $22.95

The Bugger Ver. 1.0

The Most Powerful Debugger for the 9640

Operates from MDOS mode or TI Mode via an external terminal or a computer with terminal emulator through the RS232/2 port. Takes control of the host program without corrupting the host screen.

Fully intelligent - always knows which mode it is operating from and functions accordingly.

Over 30 commands include:

Price $18.50

SPECIAL OFFER TO 9640 NEWS SUBSCRIBERS - deduct $1.50 from each program (for T and J Software only).

Price includes P & H. Send a check or money order to:

T and J Software
515 Alma Real Drive
Pacific Palisades, CA 90272

CA residents add 6.5% sales tax.

MAJOR SOFTWARE RELEASE FOR THE GENEVE

GENPROG

PROGRAM DEVELOPMENT PACKAGE BY PAUL CHARLTON

You've read about it and heard about it, now this long awaited Developers Package is available in limited release! GENPROG contains programs that run in the MDOS mode:

LIMITED RELEASE NOW AVAILABLE:
Due to the high demand for this program package we will ship GENPROG. However, GENREF documentation can't be completed until a stable MDOS is available. No estimated release date can be given. Therefore, at YOUR option, we will ship or hold your order. You will NOT be billed if we hold your credit card order. Note the pricing structure for the packages:

PACKAGE 1: GENASM, GENLINK, GENLIB, LIBRARIES and GENMAKE. GENREF to be shipped upon completion: $74.95 cash or check - $79.95 credit cards - Shipping $5.00

PACKAGE 2: GENASM, GENLINK, GENLIB, LIBRARIES, GENMAKE and GENREF. Orders held, then shipped upon completion of GENREF: $69.95 cash or check - $74.95 credit cards - Shipping $5.00

GENPROG COMPANION PACKAGE

JUMPBOOT 2.0

HARD DISK PERFORMANCE FROM A FLOPPY

Fast-Boot MDOS on your Geneve in 4.5 seconds with a Myarc or CorComp disk controller and up to 9.0 seconds with a TI controller !!

            JUMPBOOT 2.0                         Regular      With GENPROG
                                   Price         Purchase #
* 5.25 Single Sided, Single Density ...........  $15.95          $11.95
* 5.25 Double Sided, Double Density ...........  $15.95          $11.95
* 5.25 Double Sided, Single Density ...........  $15.95          $11.95
* 5.25 80 Track, Quad Density .................  $18.95          $15.95
* 3.5 80 Track, Quad Density ..................  $19.95          $16.95

Jumpboot 2.0 delivered when your GENPROG package is shipped. Add $2.00 shipping if JB2 is NOT ordered with GENPROG.

ORDER GENPROG AND JUMPBOOT NOW !

Disk Only Software Credit Card Orders: 1-800-736-4951
P.O. Box 244 Toll free now available in Canada!
Lorton, VA 22079 Delphi: DOS - CompuServe: 74405,1207

AUTO-REV

Another Example of AUTOEXEC batch files and their uses.

Listed below (you may delete this text to the firs ECHO OFF statement if you want to save it for your configuration, is my 'current' AUTOEXEC file I run on boot-up. As you will see, I setup for TIMODE and a Hard drive along with a Horizon Ramdisk as DSK6. The prompt has been redefined so that I can trace on the screen, where my current directory/subdirectory position for each device is. The F:MDOS.BORDERS is a simple program (2 sectors) that boots and redefines some of the characters around the 'text' that is ECHOED to the screen. Those symbols have been redefined into line graphics that can be displayed in 80 column mode. If you look at the text, you can easily see which characters have been redefined. If you use GETKEY or GETSTR written by Barry Boone, it is possible to use labels in the AUTOEXEC batch file in something of the following format (do not include with this AUTOEXEC batch file) (This works with MDOS 0.96H and may not work with V1.14A of MDOS released in November 1988. It should work for V1.14F of MDOS).

:MENU
A:BORDERS
ECHO  ( use the same text as in the primary menu with
        symbols with the ECHO statements)
A:GETKEY
IF %1==A GOTO A
IF %1==B GOTO B
.  .   .   .  .
.  .   .   .  .
.  .   .   .  .
IF %1==Z GOTO Z
GOTO MENU      (used if it none of the A-Z keys were
                selected)
:A
MODE 80       (used to reset the character definition so
               that we don't carry it into our program
A:BASIC1
CLS
MODE 80
GOT MENU
:B
MODE 80
A:DKA
MODE 80
GOTO MENU
:C
.
.
.
:Z
A:EXEC A:ARC1
GOTO MENU     (note, currently with EXEC, this statement is
               not executed as we come back to MDOS prompt)

:END
GOTO MENU

Please do not use any of the text in parenthesis above and do not include a blank line of text at the end of the batch file. As long as you follow this 'batch file' programming format, you can keep a batch file in a continuous loop as long as your MDOS programs exit in a normal manner (EXEC is an exception at the present). If you want to break out of a batch file as listed above, pressing CONTROL C will stop the program execution.

Listed below is my actual AUTOEXEC batch file at present as I 'accidently' erased a highly detailed AUTOEXEC from my hard drive the other day and it will take a while to recreate it exactly as I wanted.

The way the below AUTOEXEC file is written, when a key is pressed and the Enter key pressed, that particular batch file is run. By pressing A , batchfile A (in DV80 format) is run containing the following code.

CD ..         (Used to put me at the top directory
A:BASIC1

The advantage of the above programming style versus the below programming style, is that the above batch file is contained all within memory and comprises one filename on the default disk. The below file requires at least 27 filenames on the disk and requires more disk space in the long run. Something in the order of 9 sectors for the above program fully written out, versus 54 sectors for the same thing with 27 filenames (2 sectors per filename no matter if the batch file is one character in length).

(NOTE: the last character [%] that is the bottom right corner of the frame, must be used twice to display the corner. I believe this is related to some special display routine that is used in MDOS that I have not discovered yet.....)

ECHO OFF
TIMODE
ASSIGN E=DSK6:
ASSIGN F=HDS1:
ASSIGN D=DSK5:
PATH F:\BATCH\
PROMPT $n:$p$g
F:MDOS.BORDERS
E:
CLS
ECHO `@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@-
ECHO ^                                                               &
ECHO ^ A.. ABasic     H.. HyperCopy  O.. Reminders    V.. EA5 Menu   &
ECHO ^ B.. DKA        I.. Myart      P.. TI Sort      W.. MDM5       &
ECHO ^ C.. Filezap    J.. PFORM      Q.. TI Artist    X.. Telco      &
ECHO ^ D.. FixGif     K.. PCT        R.. Terminal     Y.. Disk Utils &
ECHO ^ E.. Fractals   L.. Print Set  S.. GPL Menu     Z.. Archiver   &
ECHO ^ F.. MT9640     M.. PTYPE      T.. TIMODE Off                  &
ECHO ^ G.. CLKM       N.. QDE        U.. TI Base                     &
ECHO $===============================================================/
ECHO ^                                                               &
ECHO ^ Written by: Beery W. Miller                                   &
ECHO ^ Updated on: 09.28.89 22:51:43                                 &
ECHO +===============================================================%%
ECHO
ECHO

BORDER-SRC


DXOP SYSC,0 LWPI DOSWSP WEL2 LI R0,>24 *These load in the char definitions LI R1,ULCOR *As defined above LI R2,1 LI R3,>60 CLR R4 SYSC @VID LI R1,LINES LI R3,61 SYSC @VID LI R1,LINES LI R3,64 SYSC @VID LI R1,URCOR LI R3,45 SYSC @VID LI R1,LLCOR LI R3,>2B SYSC @VID LI R1,LRCOR LI R3,37 SYSC @VID LI R1,LSIDE LI R3,94 SYSC @VID LI R1,RSIDE LI R3,38 SYSC @VID LI R1,LBETW LI R3,36 SYSC @VID LI R1,RBETW LI R3,47 SYSC @VID BLWP @MDOS LINES DATA >0000,>0000,>00FF,>00FF *@* *char definition data for boxing ULCOR DATA >0000,>0000,>00FF,>8084 *!* *now ` LLCOR DATA >8484,>8484,>8484,>80FF *$* *now + LSIDE DATA >8484,>8484,>8484,>8484 *^* URCOR DATA >0000,>0000,>00F8,>08C8 *#* LRCOR DATA >4848,>4848,>48C8,>08F8 *%* RSIDE DATA >4848,>4848,>4848,>4848 *&* LBETW DATA >8484,>8484,>8486,>8086 *$* RBETW DATA >4848,>4848,>48C8,>08C8 */* VID DATA 6 * =OR2 DOSWSP EQU >F022 * ~`========@@- MINUS MDOS EQU >0000 * 6 ^ & AMPERSAND * *DOLLAR $==========/ SLASH * * +=@@@@@@@@@% * * PLUS 2 5 END

KUGEL;PAR

PARAMETER FUER DIE KUGEL       PARAMETERS FOR THE SPHERE

Kugelmittelpunkt :0,0,1        Center of the sphere
Radius: 1
Lampe: 35,45,6.5               Light

Kamera:      -7,-7,1.7    3.5,-10,3      22,10,10      -3,-.7,.4   3,3,3
Observer
Blickvektor: 7,6.5,-.88  -3.5,8.5,-2.2  -29,-18,-10.5   3,0,.4    -1,-1,-.5
view-vektor
Oeffnungswinkel: 10.8,7.5   10.8,7.5       9.65,6.7       32,23     23,16
opening angle

Bei einer Aufl|sung von 512x212 Pixeln:  Resolution of 512*212 points

Ecke rechts oben: 255,105          right upper corner
Ecke links unten: -255,-105        corner left/down
Ausschnittgr|sse: 512,212          size

Das Programm und diese Parameter stammen aus Heft 1/86 der Zeitschrift c't
The program and these parameters are taken from issue 1/86 of the German
computer magazine c't.

Alexander Hulpke

TIDBITS

Tidbits

Many folks have probably already seen my article I uploaded on Delphi that did not own a mouse and wanted to install a cheap one. Logitech makes several different kinds of mice. There is the serial style (not Geneve compatible) and the bus style (Geneve compatible when modified). On the Specs 9640 Disk found in the SOFTWARE section of the newsletter, a detailed article can be found concering both the HIRES and LOWRES mice. Both have different pinouts. I am not sure, but I "don't" think there are any other versions of the Logitech mice (bus style). If someone locates one besides the now two that are available, please drop me a note and I will include your information on the SPECS 9640 disk (Note: this disk is continually being update. If you have already received a SPECS 9640 disk, and you see that updates have been added, simply return your disk along with $1.00 and I will return your disk with the new information. It is anticipated that this disk will soon be DS/SD or perhaps advance to 2 SS/SD disks (most likely DS/SD as that is majority of the users).

It may be of interest to many people, some facts I have gathered from my poll in my initial issue of 9640 News. Around 97 % of Geneve users (In all cases it will be those responding to the survey) have DS/SD capability (did you hear this software developers). For Mike Dodd's information, around 50 % have HyperCopy and about 40 % have Picture Transfer by Paul Charlton. A more thorough survey will be conducted in this issue as it pertains to future software developers and distributors. This is a survey geared at learning what people have bought, what they want, their supporting hardware, and other pertinent information. Please find the time to fill out this survey as it will mean others may more likely either create the software needed, have productions costs lower, and not waste their time on ill-advised software.

TISORT-REV

TI-SORT

TI-SORT is one of those programs that comes along and takes care of everything you need when something has to be done. With TI-SORT, it's application is towards sorting data files. No matter what format they are stored. Since it's author is also the author of TI-BASE, TI-SORT will handle files created by TI-BASE without any problem at all. TI-BASE data files are the easiest to handle when using TI-SORT. The best thing about TI-SORT is that in can handle an unlimited amount of data which no other program can claim. It can also sort on up to 8 fields which no other program can do. And it is extremely fast. Second in sorting speed only to J. P. Hoddies Sort Experiment which was limited and could not sort on as many fields or handle as much data.

When things become a little bit more difficult, the manual that is provided with TI-SORT steps in and explains what is needed for TI-SORT to handle your file. The manual is really only required when working with delimited files, fixed length files, basic and/or extended basic files. In those other non-standard formats, knowledge is required about the file structure and fields and the character that terminates each record. This is explained in the manual provided.

And to top things off even more, the author has built in help menu's at nearly every prompt by just pressing F7 that tells what is required for input.... and the information is in a window overlay format similar to TELCO. Support is even provided for the Geneve since it runs so much quicker. Since the Geneve has quicker keyboard response, a built in keypress will automatically slow down the repeating feature often seen on the 9640 to that on the 4A.

This program is a definite hit on my list. Texaments is offering the program for $14.95 plus $2.50 shipping and handling at 53 Center Street, Patchogue, NY 11772.

-README (TRANSFORM)

TRANSFORM UTILITY

BY LGMA PRODUCTS
JULY 19, 1989

Berry Miller asked me to do a little (useful) program to demonstrate some of the capabilities of 9640 FORTRAN. He wanted the program to show how strings might be used, and suggested a utility to convert DISPLAY/FIXED/128 files to DISPLAY/VARIABLE/80 files.

Such a program would be a really handy utility for MDOS. The reason The reason hinges behind how the standard TI-99 terminal emulators like FASTERM and TELCO handle TEXT or ASCII files (called DISPLAY/ VARIABLE/80 files on the TI-99 and GENEVE).

Normal TI-99 and MDOS files get posted on a bulletin board or network with a 128 byte header in front of the file, called a "TIFILES" header. However, files posted by other computers and ASCII or TEXT files uploaded by the TI-99 and MDOS emulators don't have a TIFILES header.

This causes the dilemma that the terminal emulator doesn't know what format the file is supposed to be in. For example, is it a PROGRAM file? A display/var/80 file? A display/fix/80 file?

Most terminal emulators resolve this by creating an arbitrary display/ fixed/128 file. Several utilities have arisen which use this format (such as the GIF picture utility by Paul Charlton) and this is ok. If you are downloading text files, however, this is the wrong format and you will see some strange things when you type out the file.

TRANSFORM fixes this. It takes a DISPLAY/FIX/128 file (the way it comes from the terminal emulator) and creates either a DISPLAY/VAR/80 file (for text files) or a DISPLAY/FIX/80 file.

The GENEVE solution - TRANSFORM

Included in this archive is a program written in 9640 FORTRAN which transforms d/f/128 files into d/f/80 or d/v/80 files. It is a short and simple program which in MDOS tradition, takes it's command parameters from the command line (rather then menu driven, like on the TI-99).

Transform is called from the MDOS command line, with the following parameters:

              TRANSFORM [input_file] [output_file][/file]
 
       input_file  :  name of input file to translate
       output_file :  name of output file to translate
       /option     :  /DF80 for dis/fix/80, /DV80 for dis/var/80
       (default = dis/fix/80)

An example of running this program would be:

              TRANSFORM E:CAPTURE128 F:CAPTURE80 /V

which says to read the d/f/128 input file on the ram disk called "capture128", and create a d/v/80 file on the hard disk called "capture80".

Basic Program Structure

The following is a high level "program design language" flow of the TRANSFORM program:

        get command line (cmdstr)
        get first file name from command line (getfile)
        get second file name from command line (getfile)
        get option from command line (getfile)
        if no option specified
            set type display/var/80
        else if option is "fixed"
            set type display/fix/80
        else if option is "variable"
            set type display/var/80
        endif
        open input and output files
        do until (end of input data)
          read five display/fixed/128 records from input file
          if ( display/fixed/80 format )
            write eight display/fixed/80 records
          else
            do for each byte in input record
              if ( input byte is cntrl/z ) set file end
              else if ( input byte is a line feed or overflow d/v/80 record ) write d/v/80 record
              else if ( input byte is a carriage return ) ignore input byte
              else if ( input byte is a tab stop ) detab output record
              else move character to output record
              endif
            enddo
          endif
        enddo

The first thing we do is get the command line string using the CMDSTR routine (BTW - Paul Charlton originated this routine, without it almost none of the FORTRAN programs would be command line driven). The program then gets three command line arguments using the GETFILE routine:

  1. the input file name (the display/fix/128 file)
  2. the output file name (the display/var/80 file)
  3. the variable or fixed option

It then sets the type flag based on the /F or /V option.

Conversion of DISPLAY/FIXED/80 files is easy, just read five display/ fixed/128 records, and write eight display/fixed/80 records. I picked five input records cause it rounded nicely to eight output records. It is usually good on disk I/O programs also to read a good chunk of data from one file, and then write a good chunk of data to another file. This usually results in faster programs.

Conversion of DISPLAY/VARIABLE/80 files is a little tougher. Five input records are again read, and then output records are created by blanking an output record, reading bytes until a line feed is detected, and writing the record to the output file. If a control/z is detected, then an end of file condition is detected and the processing terminates.

I also noted that many of the ASCII files I download are full of tab stops. Many machines (e.g. VAX computers and others) use tab stops liberally. Since the TI-99 and GENEVE can't handle them, I strip them out here and "detab" the output file. This saves you a detab step.

Extending the Utility

I usually offer to the public ways in which the utility could be extended or modified. How about:

1. A display of which line number the program is currently processing.
2. Conversion of more file types (e.g. d/f/128 to program file, etc.)
3. Variations on both input and output file types.

If you extend the program, please let me know! Note, however, the file is copyrighted 1989 by LGMA Products. This doesn't mean I don't want you to change it or use it, but if you do change it, let others enjoy what you've done! Let me know or post it somewhere so we all can benefit.

al beard
lgma products

(BTW, 9640 FORTRAN is available from Disk Only Software and Quality 99 Software. Recommended list price is $69.95, although I'm sure that both have discounted somewhat. Please check with dealers for price and delivery)

TRANSFORMS

      program transform
      implicit integer(a-z)
c
c  transform - this program transforms an input file in dis/fix/128 format
c              to an output file in dis/fix/80 or dis/var/80 format.
c
c  calling sequence:
c
c              TRANSFORM [input_file] [output_file][/file]
c
c  input_file  :  name of input file to translate
c  output_file :  name of output file to translate
c  /option     :  /DF80 for dis/fix/80, /DV80 for dis/var/80
c                 (default = dis/fix/80)
c
c  Copyright 1989 by LGMA Products.   Permission to use and post this
c  source on bbs systems, user newsletters, and other non-commercial
c  ventures given.
c
c  Update History:
c
c   v1.0      26-Jun-89       Initial Version
c
      integer *1 command(81), infile(40), oufile(40), buffer(640)
      integer *1 inbuf(128,5), oubuf(80,8), options(40), ovbuf(80)
      common command, buffer
c
      logical fileend               ! a logical variable to declare end file
c
c  following statements equivalence the 640 byte buffer two ways,
c  the first equivalences five 128 byte records to it, the second
c  equivalences eight 80 byte records.
c
      equivalence ( inbuf(1,1), buffer(1) ), (oubuf(1,1), buffer(1))
c
      error = 0                     ! set no error
      write ( 6, 9050 )             ! display banner
      command(1) = 80               ! # of spare bytes in command line
      call cmdstr ( command, error) ! get user command line
      ptr = 2                       ! set command line input pointer
      call getfile ( ptr, infile )  ! get input file name
      call getfile ( ptr, oufile )  ! get output file name
      call getfile ( ptr, options ) ! get any command options
c
c  make sure the two file names are specified
c
      if ( infile(1) .eq. ' ' .or. oufile(1) .eq. ' ' ) then
        write ( 6, 9100 )
        write ( 6, 9110 )
        goto 9999
      endif
c
c  parse the command line option, set disfix according to file option
c
      if ( options(1) .eq. ' ' ) then
        disvar = 0                  ! default
      else if ( options(1) .eq. '/' ) then
        if ( options(2) .eq. 'F' ) then
          disvar = 0
        else if ( options(2) .eq. 'V' ) then
          disvar = 1
        else
          write ( 6, 9180 ) options
          stop
        endif
      else
        write ( 6, 9180 ) options   ! error
        stop
      endif
c
c  Open the input and output files.
c
      if ( disvar .eq. 0 ) then
        write ( 6, 9060 ) infile, oufile
      else
        write ( 6, 9070 ) infile, oufile
      endif
      call open ( 1, infile, 2, 0, 0, 0, 128, error )
      if ( error .ne. 0 ) then
        write ( 6, 9120 ) error, infile
        goto 9999
      endif
c
      call open ( 2, oufile, 1, 0, disvar, 0, 80, error )
      if ( error .ne. 0 ) then
        write ( 6, 9130 ) error, oufile
        goto 9999
      endif
c
c  input and output files are now open.  Read records from input file,
c  and write them to output file
c
c  to make things simple, read 5 dis/fix 128 records into a 640 byte buffer
c  and write eight dis/fix 80 records, or a variable number of display/var/8
c  records.
c
      ouptr = 0                     ! output record pointer
      do while ( ouptr .lt. 80 )    ! blank output record
        ouptr = ouptr + 1
        ovbuf(ouptr) = ' '
      enddo
      ouptr = 0                     ! reset output pointer again
c
      fileend = .false.             ! set not file end
      do while ( ( error .eq. 0 ) .and. ( .not. fileend ) )
        inrec = 0
        do while ( inrec .lt. 5 )
          inrec = inrec + 1
          read ( 1, 9140, err=9000, end=1000, status=error )
     +          ( inbuf(i,inrec), i=1,128 )
        enddo
        goto 1010
c
c  now write eight dis/fix 80 records
c
1000    continue
        fileend = .true.            ! set eof on input file
        inrec   = inrec - 1
1010    continue
c
c  if display/fixed/80 output file, then just write the needed number
c  of records (usually 8).
c
        if ( disvar .eq. 0 ) then
          ouptr = 0                 ! set output record counter
          toprec = ( inrec * 128 ) / 80
          do while ( ouptr .lt. toprec )
            ouptr = ouptr + 1
            write ( 2, 9150, err=9010, status=error )
     +             ( oubuf(i,ouptr), i=1,80 )
          enddo
c
c  if display/variable/80 output file, things are a little more complicated.
c  flush the input file to the output file, one record at a time.  Each
c  record is terminated by a line feed, carriage returns are ignored.
c
        else
          inptr = 0
          topptr = inrec * 128        ! # of bytes input
          do while ( inptr .lt. topptr )
            inptr = inptr + 1
c
c  if character is a control/z, must be end of file.  force file end,
c  and set inptr high to force loop exit.
c
            if ( buffer(inptr) .eq. z'1a' ) then
              fileend = .true.
              inptr = 641
c
c  if a line feed is detected, or the output pointer is at 80 characters,
c  then write the output variable/80 record to the output file
c
            else if ( buffer(inptr) .eq. z'0a' .or. ouptr .eq. 80 ) then
              write ( 2, 9150, err=9010, status=error ) ovbuf
              ouptr = 0
              do while ( ouptr .lt. 80 )
 ouptr = ouptr + 1
 ovbuf(ouptr) = ' '
              enddo
              ouptr = 0
c
c  if a carriage return is detected, then do nothing (skip character)
c
            else if ( buffer(inptr) .eq. z'0d' ) then
              ouptr = ouptr           ! do nothing
c
c  if a tab stop, advance output pointer to next eighth character
c
            else if ( buffer(inptr) .eq. z'09' ) then
              ouptr = ( ouptr / 8 ) * 8 + 8
c
c  otherwise, a normal everyday ascii character.  store in output record
c
            else
              ouptr = ouptr + 1
              ovbuf(ouptr) = buffer(inptr)
            endif
          enddo
c
c  if at file end, and last output record not flushed, then flush it
c
          if ( fileend .and. ourec .gt. 0 ) then
            write ( 2, 9150, err=9010, status=error ) ovbuf
          endif
        endif
      enddo
c
c only way out of above loop is via the end= path.
c
      goto 9999
c
9000  continue
      write ( 6, 9160 ) error, infile
      goto 9999
c
9010  continue
      write ( 6, 9170 ) error, oufile
      goto 9999
c
9999  continue
      call close ( 1 )
      call close ( 2 )
      stop
c
9050  format ( ' 9640 Transform Utility / by LGMA Products')
9060  format ( ' Converting display/fixed/128 file ',40a1,/
     +         '         to display/fixed/80  file ',40a1 )
9070  format ( ' Converting display/fixed/128   file ',40a1,/
     +         '         to display/variable/80 file ',40a1)
9100  format ( ' Error - Bad File Name(s) Specified')
9110  format ( ' Format of command is:'/
     +         '    TRANSFORM input_file output_file [/option]'/
     +         '     input_file:  is the name of the input file'/
     +         '     output_file: is the name of the output file'/
     +         '     option:      is /F for dis/fix/80 (default),'/
     +         '                     /V for dis/var/80')
9120  format ( ' Error ',i6,' opening input file ',40a1 )
9130  format ( ' Error ',i6,' opening output file ',40a1 )
9140  format ( 128a1 )
9150  format ( 80a1 )
9160  format ( ' Error ',i6,' reading from input file ',40a1 )
9170  format ( ' Error ',i6,' writing to output file ',40a1 )
9180  format ( ' Error - Bad Option, use /F or /V ... ',40a1 )
      end
      subroutine getfile ( ptr, file )
      implicit integer(a-z)
c
c  getfile : extract the next file name from the command line
c
      integer *1 file(40), command(81), buffer(640)
      common  command, buffer
      logical takeslash
c
      i = 1
      do while ( i .le. 40 )
        file(i) = ' '
        i = i + 1
      enddo
c
c  skip any leading blanks in the command line
c
      length = command(1) + 1
      do while ( ptr .le. length .and. command(ptr) .eq. ' ' )
        ptr = ptr + 1
      enddo
c
c  extract the file name and move to user file id
c
      ouptr = 0
      takeslash = .false.
c
      do while ( ptr .le. length )
c
c  if not currently in quoted string, then exit if blank or slash
c  in command.
c
        if ( .not. takeslash ) then
          if ( command(ptr) .eq. ' ' ) return
          if ( ouptr .ne. 0 .and. command(ptr) .eq. '/' ) return
        endif
c
c  bump output character pointer.  if exceeded the maximum length of
c  an MDOS filename (40 characters), then display an error and exit
c
        ouptr = ouptr + 1
        if ( ouptr .gt. 40 ) then
          write ( 6, 9100 )
          stop
        endif
c
c  valid character.  stuff the character in the output string, and
c  try the next character
c
        file(ouptr) = command(ptr)
c
c  if a double quote is in the character string, then set the "literal"
c  flag (takeslash), or reset it if already set.
c
        if ( command(ptr) .eq. '"' ) then
          takeslash = .not. takeslash
        endif
        ptr = ptr + 1               ! bump input character pointer
      enddo
      return
9100  format ( ' Error - Too many characters in file name')
      end

X80DOC

Befehle von X80, preliminary beta test, V. 0.91, 11.8.89 :

Alle Befehle werden mit Call LINK aufgerufen. Wenn Parameter fehlen wird
der Standardwert eingesetzt :HPos 26,VPos 1, Size 80-VPos, Alle Zeichen
erlaubt, Eingabebeginn bei 1 usw.

MODE80 schaltet in 80Z Mode ohne Schirm zu l|schen
CLS80  dito, aber mit l|schen
MODE32 schaltet zur}ck
SCREEN,Schrift,Hintergrund   w{hlt Farbe
FLASH,Schrift, Farbe  w{hlt Blinkfarbe
FLTIME,Invtime,Normtime gibt die jeweilige Zeitdauer (0-15) der jeweiligen
Darsetllung im Blinkmodus an
BLINK[,Up,Left,Down,Right[,An]] setzt wenn An<>0 Blinken im definierten
Rechteck
CLEAR l|scht Bildschirm und Blinken
DSPLAY[,HPos[,VPos[,Size]]],String   gibt den String aus. Ohne Size wird
die gesamte Zeile bis zum Ende gel|scht. Mit Size wird nur der angegebene
Bereicxh gel|scht. Size 0 ersetzt automatisch die Stringl{nge
ACCEPT[,HPos[,VPos[,Size[,Validate$[,Startpos]]]]],A$) erlaubt Eingabe des
Strings A$. Validate$ ist ein String, der alle erlaubten Zeichen enthalten
mu~. Ist er leer, so wird alles erlaubt. Startpos setzte den Cursor zu
Beginn auf das spezifizierte Feld der Eingabemaske. Ohne Size nur Eingabe
bis Zeilenende. Bei negativer Size bleibt die Bildschirmdarstellung
erhalten.
Folgende Tastenfunktionen existieren: F1 DEL, F2 INS, F3 Erase, F5 Beginn/
F6 Ender der Maske, TAB +8 Pos, SHFT-TAB -8 Pos, Cursortasten
rechts/links. Eingabe wird beendet mit F4, F7,F9,Enter, Cursor Up/Down.
Die Dabei verwendete Taste wird im TeRMCHaR Byte der Patch-Area
abgespeichert.  Siehe auch Geneve-Basic Manual zu TERMCHAR.
PAT1AR,A  belegt A mit dem Wert f}r PAT1AR , der Patch-Area:

MPTYCH EQU ' '           Fuellzeichen
PAT1AR B    @PATGET      (intern)
BANKAD BYTE 0            (intern)
TRMCHR BYTE 0            TERMCHAR
MODEAZ DATA 0            Mode FFFF=80Z
DELTIM DATA LONGDL       Delay-Dauer (intern)
SCOL   BYTE >F4          Bildschirm Farben
BCOL   BYTE >4F          Blink-       "
BLITI  BYTE >F0          Blinkdauer
FILCHR BYTE MPTYCH
VERSIO BYTE >09          Versionsnummer: 0.9
LSTPOS BYTE 0            Position des Eingabeendes
       EVEN

Durch ab{ndern des FILCHR Bytes, kann ein anderes Zeichen als Eingabemaske
verwandt werden.
SCROLL[,Anzahl] Scrollt nach oben
DWNSCR[,Anzahl] dito nach unten
HCHAR und VCHAR wie bei TI


Als Beispiel siehe den File DEMO.

Alexander Hulpke

XHI/T

***************************************
*                                     *
* HI-RES Graphics for the GENEVE 9640 *
*    TI-Extended Basic Environment    *
*     Version 3.4  of  9.Aug.1989     *
*  This Version will run also on the  *
*   TI-99/4A with the 9938 VDP Chip   *
*                                     *
*  (C) 1988,1989 by Alexander Hulpke  *
*                                     *
***************************************

       DEF  HIRES,HICLR,NORMAL,PLOT,DCOL
       DEF  CLS,FILSCR,CIRCLE,LINE,DRAWTO
       DEF  VIPORT,PRINT,CWIDTH,GPIX
       DEF  SPRITE,LOCATE,SCOL,PATTER
       DEF  DELSPR,COPY,XPAND,YPAND
       DEF  REDUCX,REDUCY,MOD256,CLR256
       DEF  BACK,MOTION,STOP,ARTLES
       DEF  COLMIX,SAVE,LOAD,PAT0AR
       DEF  COLRES
*
NUMASG EQU  >2008
NUMREF EQU  >200C
STRREF EQU  >2014
ERR    EQU  >2034
FAC    EQU  >834A
PNTR   EQU  >8356
USRINT EQU  >83C4
GPLWS  EQU  >83E0
VDPRD  EQU  >8800
VDPSTA EQU  >8802
VDPWD  EQU  >8C00
VDPWA  EQU  >8C02
VDPW2  EQU  >8C04
VDPW3  EQU  >8C06
*
CIFAD  EQU  >6030
BASBAN EQU  >0000        Basic Bank im VDP
HIBAN  EQU  >0400        Hires Bank im VDP
TBL    EQU  255          maximale Stringlaenge/Bufferlaenge
OPEN   EQU  >0000        Pab-Opcodes
CLOSE  EQU  >0100
READ   EQU  >0200
WRITE  EQU  >0300
VDPAB  EQU  >0820        Pab Adresse im VDP |\ XBasic Crunch Buffer
VDL    EQU  30           PABlaenge
VDB    EQU  VDPAB+VDL    Databuffer im VDP  |/ lt. J.P.Hoodie
DASALE EQU  128
VIBUL  EQU  DASALE+VDL
OGC    EQU  0            Obere Grenze Viewport Standard
UGC    EQU  211          Untere  "        "        "
LGC    EQU  0            Linke   "        "        "
RGC    EQU  511          Rechte  "        "        "
*
* Workspace Registers
*
BLWS   BSS  10           0123456789ABCDEF
BLWT   BSS  32                0123456789ABCDEF
BLWA   BSS  32
MYWS   BSS  32
*
PAT0AR B    @PATGET      Routine zum Abruf von PAT0AR
BANKAD BYTE 0            VDP-Bank
COLOR  BYTE 0            Malfarbe
REGBUF DATA 0            Registerbuffer
GRMOD  DATA 0
LASTX  DATA 0
LASTY  DATA 0
OGM    DATA OGC          Speicher Obere Grenze
UGM    DATA UGC          dto. untere       "
LGM    DATA LGC               linke
RGM    DATA RGC               rechte
SKIP   DATA 8            Zeichenbreite
*
* Farbdefinitionen in der Form >RB0G
*
COLTAB DATA >0000        Transparent
       DATA >0000        Schwarz
       DATA >1106        Gruen
       DATA >3307        Hellgruen
       DATA >1701        Dunkelblau
       DATA >2703        Hellblau
       DATA >5101        Dunkelrot
       DATA >2706        Cyan
       DATA >7101        Rot
       DATA >7303        Hellrot
       DATA >6106        Dunkelgelb
       DATA >6406        Hellgelb
       DATA >1104        Dunkelgruen
       DATA >6502        Magneta (Nicht etwa der Uralt-Prozessor)
       DATA >5505        Grau
       DATA >7707        Weiss
*
VERSIO BYTE >34          Version 3.4
LOGOP  BYTE 0            Logische Operation
FIRSTW DATA 0            erstes Wort des Files
GREREC DATA 511          Rechte Grenze
EINSB  BYTE 1            256er Bit da zweite Darstellungsseite
PAL    BYTE 0            2 selects PAL Video Bit
BEWEGE BYTE 0
AUSTRI BYTE 0            Wenn 1, Header nach Oesterreichischer Norm
*
FAR256 BYTE 0,0          TI Standardfarben im 256 Farben Modus
       BYTE 197,237
       BYTE 39,107
       BYTE 53,203
       BYTE 61,126
       BYTE 216,218
       BYTE 133,90
       BYTE 182,255
*
* Farbcodes beim Zur}cksetzen
*
STDCOL DATA 0,0,>1106,>3307,>1701,>2703
       DATA >5101,>2706,>7101,>7303,>6106
       DATA >6406,>1104,>6502,>5505,>7707
*
PSET   BYTE >50
FILCMD BYTE >80
MOVCMD BYTE >90
POICMD BYTE >40

       EVEN

ARTPAB DATA >0500
       DATA 256
       DATA 0
       DATA 6145
       BYTE 0,9
PABBB  TEXT 'DSK1.LOGO'
       BSS 12
*
PIC    TEXT '_P'
COL    TEXT '_C'

       EVEN

PAB    BYTE 0            Opcode
FILEMO BYTE >00          Display,Fixed; wird ueberschrieben
       DATA VDB          Data Buffer in VDP
       BYTE DASALE
       BYTE DASALE       Chrcount
       DATA 0            Rec. Nr.
       BYTE 0            Screen Offset
PANL   BYTE TBL          Name Length
* This MUST be an EVEN Adress!
TBUFF  BSS  TBL          Name
*
VIDSAV BSS  VIBUL        Allgemeiner Datenbuffer
*                        Neue Open-Mode Bytes, werden ueber
OUTPUT BYTE >02          @FILEMOde geschrieben (Vorher war das Lesen
INPUT  BYTE >04          geschuetzter Files unmoeglich!)
*
* DSRLNK FUER XBASIC  (Version mit vollstaendiger Suche)
*
LOESCH BYTE >20
PUNKT  TEXT '.'
HEADER BYTE >AA
*
       EVEN
*
DSRLNK DATA BLWA,DSRR
DSRR   MOV  *14+,5
       SZCB @LOESCH,15
       MOV  @BANKAD,@REGBUF
       CLR  0
       MOVB 0,@BANKAD
       MOV  @PNTR,0
       MOV  0,9
       AI   9,>FFF8
       BLWP @VSBR
       MOVB 1,3
       SRL  3,8
       SETO 4
       LI   2,BLWT
DSR1   INC  0
       INC  4
       CI   4,7
       JGT  IOERR2
       C    4,3
       JEQ  DSR2
       BLWP @VSBR
       MOVB 1,*2+
       CB   1,@PUNKT
       JNE  DSR1
DSR2   MOV  4,4
       JEQ  IOERR2
       CLR  @>83D0
       MOV  4,@>8354
       INC  4
       A    4,@PNTR
DSR3   LWPI GPLWS
       CLR  1
       LI   12,>0F00
DSR4   MOV  12,12
       JEQ  DSR5
       SBZ  0
DSR5   AI   12,>0100
       CLR  @>83D0
       CI   12,>2000
       JEQ  IOERR1
       MOV  12,@>83D0
       SBO  0
       LI   2,>4000
       CB   *2,@HEADER
       JNE  DSR4
       A    @BLWA+10,2
       JMP  DSR7
DSR6   MOV  @>83D2,2
       SBO  0
DSR7   MOV  *2,2
       JEQ  DSR4
       MOV  2,@>83D2
       INCT 2
       MOV  *2+,9
       MOVB @>8355,5
       JEQ  DSR9
       CB   5,*2+
       JNE  DSR6
       SRL  5,8
       LI   6,BLWT
DSR8   CB   *6+,*2+
       JNE  DSR6
       DEC  5
       JNE  DSR8
DSR9   INC  1
       BL   *9
       JMP  DSR6
       SBZ  0
       LWPI BLWA
       MOV  9,0
       BLWP @VSBR
       SRL  1,13
       JNE  IOERR3
DSRRET MOV  @REGBUF,@BANKAD
       RTWP
IOERR1 LWPI BLWA
IOERR2 CLR  1
IOERR3 SWPB 1
       MOVB 1,*13
       SOCB @LOESCH,15
       JMP  DSRRET

*                        Verbesserte Support-Routinen
*                        fuer 128k VDP-Ram
VSBW   DATA BLWS,VSBW1
VMBW   DATA BLWS,VMBW1
VSBR   DATA BLWS,VSBR1
VMBR   DATA BLWS,VMBR1
VWTR   DATA BLWS,VWTR1
FAWA   DATA BLWS,FAWA1   Einfaches XMLLNK CFI
WAFA   DATA BLWS,WAFA1   dto.             CIF
*
VSBW1  BL   @VWAUB
       MOVB 1,@VDPWD     Byte schreiben
       RTWP
*
VMBW1  BL   @VWAUB
VMWL   MOVB *1+,@VDPWD   Bytes schreiben
       DEC  2
       JNE  VMWL
       RTWP
*
VSBR1  BL   @VRAUB
       MOVB @VDPRD,@2(13)   Byte lesen
       RTWP
*
VMBR1  BL   @VRAUB
VMRL   MOVB @VDPRD,*1+   Bytes lesen
       DEC  2
       JNE  VMRL
       RTWP
*
VWAUB  LI   2,>4000      Bit fuer VDP-Write
       JMP  VAUB
VRAUB  CLR  2
VAUB
       MOV *13,0
       MOV 0,1
       ANDI 1,>3FFF           GUELTIGE BITS MASKIEREN
       SRL  0,6               BANK WAEHLEN
       ANDI 0,>0300
       AB   @BANKAD,0         Bank Offset addieren
       MOVB 0,@VDPWA
       LI   0,>8E00
       MOVB 0,@VDPWA
       SOC  2,1
       MOVB @BLWS+3,@VDPWA    ADRESSE SCHREIBEN
       MOVB 1,@VDPWA
       MOV  @2(13),1          R1&
       MOV  @4(13),2          R2 uebertragen
       RT
*
VWTR1  MOV  *13,0
       MOVB @1(13),@VDPWA
       ORI  0,>8000
       MOVB 0,@VDPWA
       RTWP
*
* Die folgende Routine ist zwar nicht schoen, aber dafuer schnell

POINT  DATA BLWT,POINT1
QPOINT DATA BLWT,QPOIN1
*
*  Plot: R0=v/R1=>/R2-High=Farbe/Logische Operation erlaubt
POINT1 MOV  *13,0
       C    0,@UGM        Bereich testen
       JH   PLORT
       C    0,@OGM
       JLT  PLORT
       MOV  @2(13),1
       C    1,@RGM
       JH   PLORT
       C    1,@LGM
       JLT  PLORT
*
BEPL99
       SWPB 1
       MOV  1,2
       SOCB @EINSB,0
       SWPB 0
       MOV  0,3
       MOVB @4(13),0
       MOV  0,6
       MOVB @PSET,7
       SOCB @LOGOP,7
       LI   0,>1124      AB 36 AUTOINC
       BLWP @VWTR
       LI   1,BLWT+4
       LI   0,11
PLOWRI MOVB *1+,@VDPW3
       DEC  0
       JNE  PLOWRI
PLORT  RTWP
*
QPOIN1 MOV  *13,0
       MOV  @2(13),1
       JMP  BEPL99
*
WRIREG SOCB @LOGOP,@TBUFF+14
WRIRE1 LI   0,>1120      AB 32 AUTOINC
       LI   1,TBUFF
       LI   2,15
       SOCB @EINSB,@TBUFF+3
       SOCB @EINSB,@TBUFF+7
       BLWP @VWTR
WREWRI MOVB *1+,@VDPW3
       DEC  2
       JNE  WREWRI
       RT
*
CHKWRK LI   0,>0F02
       BLWP @VWTR
WARTE  MOVB @VDPSTA,1
       ANDI 1,>0100
       JNE  WARTE
       LI   0,>0F00
       BLWP @VWTR
       RT
*
FUELLE DATA BLWT,FILSC1
* Fuelle Block: 0=v/1=>/2=vCNT/3=>CNT/4MSB=Farbe
FILSC1
       LI   1,TBUFF+4
       MOV  13,2
       LI   3,2
ZWICOR MOV  @2(2),0
       SWPB 0
       MOV  0,*1
       MOV  *2,0
       SLA  0,8          MAXIMAL 256 VERT.
       MOV  0,@2(1)
       AI   1,4
       AI   2,4
       DEC  3
       JNE  ZWICOR
       MOVB *2,0   LSBYTE(0)=>00
       MOV  0,*1+
       MOVB @FILCMD,*1
       BL   @WRIREG
       BL   @CHKWRK
       RTWP
*
MOVBLK DATA BLWT,MOVBL1
MOVBL1 MOV  13,12
       MOV  *12+,4  VVON
       MOV  *12+,5  H
       MOV  *12+,6  VZU
       MOV  *12+,7  H
       MOV  *12+,8  VLEN
       MOV  *12,9   H
       CLR  10
       C    6,4
       JLT  NOSET1
       A    8,4
       A    8,6
       DEC  4            Bei Laenge 1 bleibt
       DEC  6            Die Koordinate erhalten
       ORI  10,>8
NOSET1 C    7,5
       JLT  NOSET2
       A    9,5
       A    9,7
       DEC  5            Siehe oben DEC 4/6
       DEC  7
       ORI  10,>4
NOSET2 LI   1,TBUFF
       LI   2,BLWT+8
       LI   3,3
TRICOR MOV  @2(2),0
       SWPB 0
       MOV  0,*1
       MOV  *2,0
       SLA  0,8
       MOV  0,@2(1)
       AI   1,4
       AI   2,4
       DEC  3
       JNE  TRICOR
       MOV  10,*1+
       MOVB @MOVCMD,*1
       BL   @WRIREG
       BL   @CHKWRK
       RTWP
*
*
KREIS  DATA BLWA,KREIS1
* 0,1=CNTR,2=RAD,3=COL
KREIS1
       MOV  15,@REGBUF
       MOV  13,12
       MOV  *12+,10    10=MV
       MOV  *12+,11 11=M>
       MOV  *12+,15 15=R
       MOVB *12,2  2B=C0L
       MOV  15,4
       MPY  4,4
       MOV  5,12      12=R^2
       CLR  3
KRELOP
       MOV  3,4
       MPY  4,4       5=Y^2
       LI   4,128
       LI   1,8
       CLR  6         6=X
KWL    MOV  6,7       7=KOPIE6
       A    4,7
       MOV  7,8
       MPY  8,8
       A    5,9       X^2+Y^2
       JOC  KRESKP
       C    9,12
       JGT  KRESKP
       MOV  7,6
KRESKP SRL  4,1
       DEC  1
       JNE  KWL
*
       MOV  10,0
       MOV  11,1
       S    6,0          X-X
       S    3,1          Y-Y
       BLWP @POINT
*
       MOV  11,1
       A    3,1          Y+Y
       BLWP @POINT
*
       MOV  10,0
       A    6,0          X+X
       BLWP @POINT
*
       MOV  11,1
       S    3,1          Y-Y
       BLWP @POINT
*
       MOV  10,0
       MOV  11,1
       S    3,0          X-Y
       S    6,1          Y-X
       BLWP @POINT
*
       MOV  11,1
       A    6,1          Y+X
       BLWP @POINT
*
       MOV  10,0
       A    3,0          X+Y
       BLWP @POINT
*
       MOV  11,1
       S    6,1          Y-X
       BLWP @POINT
*
       C   3,6
       JGT RTKR
       INC 3
       C   3,15
       JLE KGOTO
RTKR   MOV  @REGBUF,15
       RTWP
KGOTO  B @KRELOP
*
LINIE  DATA BLWA,LINIE1
*
FARBE  EQU  2
LX1    EQU  0
LY1    EQU  1
LX2    EQU  3
LY2    EQU  4
LXC    EQU  5
LDX    EQU  6
LYC    EQU  7
LDY    EQU  8
LXS    EQU  9
LYS    EQU  10
LLL    EQU  11
*
LINIE1 MOV  13,12
       MOV  *12+,LX1
       MOV  *12+,LY1
       MOV  *12+,LX2
       MOV  *12+,LY2
       MOVB *12,FARBE
       MOV  LX2,LDX
       S    LX1,LDX
       MOV  LY2,LDY
       S    LY1,LDY
       LI   LXS,-1
       ABS  LDX
       JLT  LBXW
       INCT LXS    LXS=1
LBXW   LI   LYS,-1
       ABS  LDY
       JLT  LBYW
       INCT LYS    LYS=1
LBYW
       C    LDX,LDY
       JLT  LDYWG
* DX>=
       CLR  LXC
       CLR  LYC
       MOV  LDY,LDY
       JNE  LXNG
       CLR  LYS
       MOV  LDX,LLL
       JMP  LGL
LXNG   DIV  LDY,LXC
LXL    MOV  LXC,LLL
       A    LDX,LYC
       C    LYC,LDY
       JLT  LPXL
       INC  LLL
       S    LDY,LYC
LPXL   BLWP @POINT
       A    LXS,LX1
       DEC  LLL
       JNE  LPXL
       A    LYS,LY1
       C    LX1,LX2
       JNE  LXL
       JMP  LRTN
*
LDYWG
       CLR  LXC
       CLR  LYC
       MOV  LDX,LDX
       JNE  LYNG
       CLR  LXS
       MOV  LDY,LLL
       JMP  LGL
LYNG   DIV  LDX,LYC
LYL    MOV  LYC,LLL
       A    LDY,LXC
       C    LXC,LDX
       JLT  LPYL
       INC  LLL
       S    LDX,LXC
LPYL   BLWP @POINT
       A    LYS,LY1
       DEC  LLL
       JNE  LPYL
       A    LXS,LX1
       C    LY1,LY2
       JNE  LYL
       JMP  LRTN
*
LGL    MOV  LLL,LLL      0 ABFANGEN
       JNE  LGLL
       INC  LLL
LGLL   BLWP @POINT
       A    LXS,LX1
       A    LYS,LY1
       DEC  LLL
       JNE  LGLL
*
LRTN   RTWP
*
* get PAT0AR
*
PATGET LWPI MYWS
       LI   0,PAT0AR
       MOV  0,@FAC
       BLWP @WAFA
       CLR  0
       LI   1,1
       BLWP @NUMASG
       B    @NOMEX
*
*  Lade Orginal Viewport
*
ORPORT LI   12,OGC
       MOV  12,@OGM
       LI   12,UGC
       MOV  12,@UGM
       LI   12,LGC
       MOV  12,@LGM
       MOV  @GREREC,@RGM
       RT
*
* Test auf Hires Mode
*
MOTES
       LI   0,HIBAN
       MOVB 0,@BANKAD
       MOV  @GRMOD,0     GRMOD=F
       JEQ  NOKK
       RT
NOKK   LWPI MYWS
       MOV  @GRMOD,@GRMOD
       JEQ  NONOSW
       BL   @NOSWI
NONOSW LI   0,>0A00      IMAGE ERROR, wenn falscher Modus
       BLWP @ERR
*
HISWI  LI   0,511        Im 16 Farben Modus
       JMP  HEIBEI
SWIHI  LI   0,255
HEIBEI MOV  @GRMOD,@GRMOD
       JEQ  HINMTS
       C    0,@GREREC
       JEQ  NOKK
HINMTS MOV  0,@GREREC
       MOV  @GRMOD,@GRMOD
       JNE  HIMOSH
       LI   0,>01A0      Bildschirm ausschalten
       BLWP @VWTR        um Flimmern zu vermeiden
       CLR  3            Basic Bank retten
       MOVB 3,@BANKAD
       MOVB 3,@LOGOP     Logic=IMP
       LI   1,PANL
       LI   2,TBL+1
HISALO CLR  0            Graphicsmode schalten
       BLWP @VWTR
       MOV  3,0
       BLWP @VMBR
       LI   0,>000A      HiResmode schalten
       BLWP @VWTR
       MOV  3,0
       BLWP @VMBW
       A    2,3
       CI   3,>4000
       JLT  HISALO
*
HIMOSH MOVB @GREREC,0
       JNE  HIMO16
       LI   0,>000E      256 Farb Modus
       BLWP @VWTR
HIMO16 LI   0,>023F      Wenn hier (korrekt) >0200 staende,
       BLWP @VWTR        wuerde es nicht funktionieren
       LI   0,>03E0      Farbspeicher (hoffentlich Sprite)
       BLWP @VWTR
       LI   0,>05F4      Sprite Bildschirmspeicher
       BLWP @VWTR
       LI   0,>0600      Sprite Zeichenspeicher auf XBasic Zeichenspeicher
       BLWP @VWTR
       LI   0,>0700      Hintergrund schwarz
       BLWP @VWTR
       LI   0,>0980      212 Pkte. vertikal
       SOCB @PAL,@MYWS+1 PAL einORen
       BLWP @VWTR
       LI   0,>0A07
       BLWP @VWTR
       LI   0,>0B03
       BLWP @VWTR
*
       LI   0,HIBAN
       MOV  0,@BANKAD    Bank setzen und COLOR=0
       SETO @GRMOD
       LI   2,32
       LI   0,>FA00      Sprites wegschalten
       LI   1,>D600
HSSAL  BLWP @VSBW
       AI   0,4
       DEC  2
       JNE  HSSAL
       LI   0,>01E0
       BLWP @VWTR
       RT
*
HICLR  LWPI MYWS
       BL   @HISWI
CLSHI  LI   0,8
       MOV  0,@SKIP
CLS    LWPI MYWS
       BL   @ORPORT
*
FILSCR LWPI MYWS
       BL   @MOTES
       LI   2,1
       BL   @COGET
       MOV  @OGM,0
       MOV  @LGM,1
       MOV  @UGM,2
       S    0,2
       INC  2
       MOV  @RGM,3
       S    1,3
       INC  3
       MOVB @COLOR,4
       BLWP @FUELLE
*
EXIT
       LI 0,>0E00        Return to BASIC
LEAV   BLWP @VWTR
NOMEX  LWPI GPLWS
       B    @>006A       GPL: CLR COND.BIT
*
HIRES  LWPI MYWS
       BL   @HISWI
       BL   @ORPORT
       JMP  EXIT
*
MOD256 LWPI MYWS
       BL   @SWIHI
       BL   @ORPORT
       JMP  EXIT
*
CLR256 LWPI MYWS
       BL   @SWIHI
       JMP  CLSHI
*
NOSWI  MOV  11,10
       BL   @INTAUS      Interrupt muss aus sein !
       LI   0,>01A0      Bildschirm ausschalten
       BLWP @VWTR        um Flimmern zu vermeiden
       CLR  3            Basic Bank retten
       MOVB 3,@BANKAD
       LI   3,>4000-TBL-1
       LI   1,PANL
       LI   2,TBL+1
NOSALO LI   0,>000A      HiResmode schalten
       BLWP @VWTR
       MOV  3,0
       BLWP @VMBR
       CLR  0            Graphicsmode schalten
       BLWP @VWTR
       MOV  3,0
       BLWP @VMBW
       S    2,3
       CI   3,-1
       JGT  NOSALO
*
       LI   0,>0200
       BLWP @VWTR
       LI   0,>0320
       BLWP @VWTR
       LI   0,>0506
       BLWP @VWTR
       LI   0,>0600
       BLWP @VWTR
       LI   0,>0707      Hintergrund cyan
       BLWP @VWTR
       LI   0,>0900      192 Pkte. vertikal
       SOCB @PAL,@MYWS+1 PAL einORen
       BLWP @VWTR
       LI   0,>0A00
       BLWP @VWTR
       LI   0,>0B00
       BLWP @VWTR
*
       CLR  0
       MOVB 0,@BANKAD
       CLR  @GRMOD
       LI   0,>01E0      Bildschirm wieder anschalten
       BLWP @VWTR
       B    *10
*
NORMAL LWPI MYWS
       BL   @MOTES
       BL   @NOSWI
       B    @EXIT
*
* FAC -> INTEGER (BILLIG XMLLNK)
FAWA1  LWPI GPLWS
       MOV  11,@REGBUF
       BL   @>12B8       CFI Aufrufen
       MOV  @REGBUF,11
       LWPI BLWS
       RTWP
*
* FAC -> FLOATING POINT
WAFA1  LWPI GPLWS
       MOV  11,@REGBUF
       MOV  @CIFAD,1
       BL   *1
       MOV  @REGBUF,11
       LWPI BLWS
       RTWP
*
GETCOR LI   1,1          Parameter 1
GETCOA CLR  0            kein Array
       LI   6,2          2 Param's lesen
GLOPP  MOV  @FAC,7       Trick :Param 1 retten
       BLWP @NUMREF      Param wandeln
       BLWP @FAWA
       INC  1            next Param
       DEC  6            Schleife 2*
       JNE  GLOPP
       MOV  @FAC,1       Param 2 uebertragen
       MOV  7,0          Param 1 uebertragen
       MOV  0,@LASTX
       MOV  1,@LASTY
       RT
*
GETINC INC  1
GETONE CLR  0
       BLWP @NUMREF
       BLWP @FAWA
       MOV  @FAC,2
       RT
*
PARCNT MOVB @>8312,1
       SRL  1,8
       RT
*
PLOT   LWPI MYWS
       BL   @MOTES
       LI   2,3
       BL   @COGET
       MOVB @COLOR,2
       BL   @GETCOR
       BLWP @POINT
       B    @EXIT
*
GPIX   LWPI MYWS
       BL   @MOTES
       BL   @GETCOR
       SWPB 0
       SWPB 1
       MOV  1,@TBUFF     XCOR
       MOV  0,@TBUFF+2   YCOR
       CLR  0
       MOVB 0,@TBUFF+13
       MOVB @POICMD,@TBUFF+14
       BL   @WRIRE1      OHNE LOGOP einsetzen
       BL   @CHKWRK
       LI   0,>0F07
       BLWP @VWTR
       MOVB @VDPSTA,1
       LI   0,>0F00
       BLWP @VWTR
       SRL  1,8
       MOVB @GREREC,@GREREC
       JEQ  NIGENC
       INC  1
NIGENC MOV  1,@FAC
       BLWP @WAFA
       CLR  0
       LI   1,3
       BLWP @NUMASG
       B    @NOMEX
*
CIRCLE LWPI MYWS
       BL   @MOTES
       LI   2,4
       BL   @COGET
       LI   1,3          Radius lesen
       BL   @GETONE      (zuerst, da sonst
*                        R0&1 ueberschrieben
*                        wuerden)
       BL   @GETCOR      Mittelpunkt lesen
       MOVB @COLOR,3
       BLWP @KREIS
       B    @EXIT
*
LINE   LWPI MYWS
       BL   @MOTES
       LI   2,5
       BL   @COGET
       LI   1,3
       BL   @GETCOA
       MOV  0,2
       MOV  1,3
       BL   @GETCOR      KOORDINATEN HOLEN
       MOVB @COLOR,4
       BLWP @LINIE
       B    @EXIT
*
DRAWTO LWPI MYWS
       BL   @MOTES
       LI   2,3
       BL   @COGET
       MOV  @LASTX,2
       MOV  @LASTY,3
       BL   @GETCOR      KOORDINATEN HOLEN
       MOVB @COLOR,4
       BLWP @LINIE
       B    @EXIT
*
DCOL   LWPI MYWS
       BL   @MOTES
       LI   2,1
       BL   @COGET
NUCOL  B    @NOMEX
*
COGET
       MOV  11,15
       BL   @PARCNT
       MOV  1,3
       C    3,2
       JL   KEIFAD
       MOV  2,1
       BL   @GETONE
       MOVB @GREREC,@GREREC
       JEQ  NIFADE
       DEC  2            Nur im 16-er Mode
NIFADE SLA  2,8
       MOVB 2,@COLOR
       CI   15,PRINTE
       JEQ  KEIFAD
       C    1,3
       JHE  KEIFAD
       BL   @GETINC
       SLA  2,8
       MOVB 2,@LOGOP
KEIFAD
       B    *15
*
VIPORT LWPI MYWS
       BL   @PARCNT
       CI   1,4
       JEQ  NEWPOR
       BL   @ORPORT
       JMP  NUCOL
NEWPOR BL   @GETCOR
       MOV  0,@OGM
       MOV  1,@LGM
       LI   1,3
       BL   @GETCOA
       MOV  0,@UGM
       MOV  1,@RGM
       JMP  NUCOL
*
CWIDTH LWPI MYWS
       BL   @PARCNT
       MOV  1,1
       JNE  CWMIFA
       LI   2,8
       JMP  TOSKIP
CWMIFA BL   @GETONE
TOSKIP MOV  2,@SKIP
       JMP  NUCOL
*
BACK   LWPI MYWS         CALL SCREEN belegt V7 voll
       LI   2,1          mit 2*4 Bit
       BL   @COGET
       MOVB @COLOR,0
       MOVB 0,@FIRSTW
       SRL  0,8
       AI   0,>0700
       BLWP @VWTR
       JMP  NUCOL
*
PRINT  LWPI MYWS
       BL   @MOTES
       CLR  12
       LI   2,4
       BL   @COGET
PRINTE MOVB @COLOR,10
       LI   2,5
       BL   @COGET
       CI   3,5
       JLT  PRINEB
       SETO 12
       MOVB @COLOR,12
PRINEB MOVB 10,@COLOR
       BL   @GETNAM
       MOV  2,5
       LI   1,2
       BL   @GETCOA
       MOV  0,3
       MOV  1,4
       MOVB *5+,15
       SRL  15,8
STRLOP MOVB *5+,6
       SRL  6,8
       AI   6,96
       SLA  6,3
       MOV  3,8
       LI   7,8
BYLOP  LI   13,>0004
       MOVB 13,@BANKAD
       MOV  6,0
       BLWP @VSBR
       MOVB 1,9
       SWPB 13
       MOVB 13,@BANKAD
       MOV  8,0
       MOV  4,1
       MOV  @SKIP,10
BILOP  SLA  9,1
       JOC  NOPBP
       MOVB 12,2
       JEQ  PRNOPL
       JMP  PSPJU
NOPBP  MOVB @COLOR,2
PSPJU  BLWP @POINT
PRNOPL INC  1
       DEC  10
       JNE  BILOP
*
       INC  6
       INC  8
       DEC  7
       JNE  BYLOP
*
       A    @SKIP,4
       DEC  15
       JNE  STRLOP
       B    @EXIT
*
COPY   LWPI MYWS
       BL   @MOTES
       BL   @PARCNT
       CI   1,3
       JLT  CONOLO
       BL   @GETONE
       SLA  2,8
       MOVB 2,@LOGOP
CONOLO BL   @GETCOR
       MOV  0,2
       MOV  1,3
       MOV  @OGM,0
       MOV  @LGM,1
       MOV  @UGM,4
       S    0,4
       INC  4
       MOV  @RGM,5
       S    1,5
       INC  5
       BLWP @MOVBLK
       B    @EXIT
*
XPAND  LWPI MYWS
       BL   @MOTES
       LI   8,1
       BL   @PARCNT
       MOV  1,1
       JEQ  XNACHT
       BL   @GETONE
       MOV  2,8
XNACHT
       CLR  0
       MOVB 0,@LOGOP
       MOV  @UGM,4
       S    @OGM,4
       INC  4
       LI   5,1
       MOV  @OGM,0
       MOV  0,2
       MOV  @RGM,7
       S    @LGM,7
       INC  7
       MOV  @RGM,1
       MOV  1,3
       MOV  8,6
XRELO  A    7,3
       DEC  6
       JNE  XRELO
       INC  8
XCWALO MOV  8,6
XCDOLO C    3,@GREREC
       JGT  XNOM
       BLWP @MOVBLK
XNOM   DEC  3
       DEC  6
       JNE  XCDOLO
       DEC  1
       DEC  7
       JNE  XCWALO
       B    @EXIT
*
YPAND  LWPI MYWS
       BL   @MOTES
       LI   8,1
       BL   @PARCNT
       MOV  1,1
       JEQ  YNACHT
       BL   @GETONE
       MOV  2,8
YNACHT
       CLR  0
       MOVB 0,@LOGOP
       MOV  @RGM,5
       S    @LGM,5
       INC  5
       LI   4,1
       MOV  @LGM,1
       MOV  1,3
       MOV  @UGM,7
       S    @OGM,7
       INC  7
       MOV  @UGM,0
       MOV  0,2
       MOV  8,6
YUNLO  A    7,2
       DEC  6
       JNE  YUNLO
       INC  8
YCWALO MOV  8,6
YCDOLO CI   2,211
       JGT  YNOM
       BLWP @MOVBLK
YNOM   DEC  2
       DEC  6
       JNE  YCDOLO
       DEC  0
       DEC  7
       JNE  YCWALO
       B    @EXIT
*
REDUCX LWPI MYWS
       BL   @MOTES
       LI   8,1
       BL   @PARCNT
       MOV  1,1
       JEQ  XRNACH
       BL   @GETONE
       MOV  2,8
XRNACH INC  8
       CLR  0
       MOVB 0,@LOGOP
       MOV  @UGM,4
       S    @OGM,4
       INC  4
       LI   5,1
       MOV  @OGM,0
       MOV  0,2
       MOV  @LGM,3
       MOV  3,1
       INC  1
XREDLO
       BLWP @MOVBLK
       INC  3
       A    8,1
       C    1,@RGM
       JLE  XREDLO
       B    @EXIT
*
REDUCY LWPI MYWS
       BL   @MOTES
       LI   8,1
       BL   @PARCNT
       MOV  1,1
       JEQ  YRNACH
       BL   @GETONE
       MOV  2,8
YRNACH INC  8
       CLR  0
       MOVB 0,@LOGOP
       MOV  @RGM,5
       S    @LGM,5
       INC  5
       LI   4,1
       MOV  @LGM,1
       MOV  1,3
       MOV  @OGM,2
       MOV  2,0
       INC  0
YREDLO
       BLWP @MOVBLK
       INC  2
       A    8,0
       C    0,@UGM
       JLE  YREDLO
       B    @EXIT
*
* Farbe mischen / nach Mike Dodd in Mp5/88
*
COLMIX LWPI MYWS
       LI   1,1
       BL   @GETONE     get Farbton
       MOV  2,3
       DEC  3
       BL   @GETINC     get Rot
       MOV  2,4
       SLA  4,4
       BL   @GETINC     get Green
       MOV  2,5
       MOV  2,6
       BL   @GETINC     get Blue
       A    2,4
       MOV  3,0
       AI   0,>1000
       BLWP @VWTR
       SLA  4,8
       MOVB 4,@VDPW2
       SLA  5,8
       MOVB 5,@VDPW2
*
       SLA  3,1          auf Wortabstand bringen
       A    6,4          Farbwort bilden
       MOV  4,@COLTAB(3) in ColorTabelle schreiben
*
LJNOMX B    @NOMEX

* RESET Colors

COLRES LWPI MYWS
       LI   1,STDCOL
       CLR  2
CORLUP MOV  2,0               Set ColNum
       AI   0,>1000
       BLWP @VWTR
       MOV  2,3
       SLA  3,1
       MOV  *1,@COLTAB(3)    in TABLE
       MOVB *1+,@VDPW2       Und DEFen
       MOVB *1+,@VDPW2
       INC  2
       CI   2,16
       JLT  CORLUP
*
       JMP  LJNOMX
*
SPRITE LWPI MYWS
       BL   @MOTES
       LI   2,33         Standard schreiben
       LI   1,'0'*256
NUWILO MOVB 1,@PANL(2)
       DEC  2
       JNE  NUWILO
       LI   1,3          PARAM 3
       LI   3,32*256     Maxlen
       BL   @GETNA1
       LI   1,4
       BL   @GETCOA
       MOV  0,6
       MOV  1,3
       LI   1,1
       BL   @GETONE
       MOV  2,5
       DEC  5            NIEDRIGSTER IST 0=XB1
       INC  1
       BL   @GETONE
       MOV  5,0
       MOV  2,4
       AI   4,96         BASIC CHAR OFFSET
       SLA  0,2          je 4 Bytes
       AI   0,>FA00      Tabellenoffset
       MOV  6,1
       SLA  1,8
       BLWP @VSBW        Ycoor schreiben
       SLA  3,8
       MOVB 3,@VDPWD     X
       SLA  4,8
       MOVB 4,@VDPWD     Patcode
       MOV  5,0
SPRICO SLA  0,4          *16 => Eintraglaenge Colortable
       AI   0,>F7FE      vdp adr setzen
       BLWP @VSBR        nach dem Lesen auf der richtigen Adresse
       LI   2,PANL+1
       CLR  5
       LI   3,16
SCOTAL BL   @NYBBLE
       SLA  5,4
       MOVB 5,1
       BL   @NYBBLE
       AB   5,1
       MOVB 1,@VDPWD
       DEC  3
       JNE  SCOTAL
       B    @EXIT
*
* Hilfsroutine: lese Byte und wandle in Nybble
*
NYBBLE MOVB *2+,5
       AI   5,-48*256
       CI   5,10*256
       JL   NIRT
       AI   5,-7*256
NIRT   RT
*
LOCATE LWPI MYWS
       BL   @MOTES
       LI   1,1
       BL   @GETONE
       INC  1
       BL   @GETCOA
       MOV  1,3
       MOV  0,1
       SLA  3,8
       SLA  1,8
       MOV  2,0
       DEC  0
       SLA  0,2
       AI   0,>FA00
       BLWP @VSBW
       MOVB 3,@VDPWD
       B    @EXIT
*
SCOL   LWPI MYWS
       BL   @MOTES
       LI   2,33         Standard schreiben
       LI   1,'0'*256
SCONUL MOVB 1,@PANL(2)
       DEC  2
       JNE  SCONUL
       LI   1,2          PARAM 3
       LI   3,32*256     Maxlen
       BL   @GETNA1
       DEC  1            GET NUMBER
       BL   @GETONE
       MOV  2,0
       DEC  0
       JMP  SPRICO
*
PATTER LWPI MYWS
       BL   @MOTES
       LI   1,2
       BL   @GETONE
       MOV  2,3
       DEC  1
       BL   @GETONE
       MOV  2,0
       DEC  0
       MOV  3,1
       AI   1,96         OFFSET
       SLA  1,8
       SLA  0,2
       AI   0,>FA02
       BLWP @VSBW
       B    @EXIT
*
DELSPR LWPI MYWS
       BL   @MOTES
       LI   1,1
       BL   @GETONE
       MOV  2,0
       DEC  0
       SLA  0,2
       AI   0,>FA00
       LI   1,>D600
       BLWP @VSBW
       B    @EXIT
*
GETNAM LI   1,1
       LI   3,TBL*256    Maxlen Namenlaenge
GETNA1 LI   2,PANL
       MOVB 3,*2         schreiben
       CLR  0
       MOV  @BANKAD,@REGBUF
       MOVB 0,@BANKAD
       BLWP @STRREF      Name lesen
       MOV  @REGBUF,@BANKAD
       RT
*
WRIP
       CLR  0
       LI   0,VDPAB
       LI   1,VIDSAV
       LI   2,VIBUL
       BLWP @VMBR        Bereich retten
       LI   1,PAB        PAB schreiben
       LI   2,VDL
       BLWP @VMBW
       LI   12,VDPAB+9   ^Namlen
       MOV  12,@PNTR
       BLWP @DSRLNK      Open
       DATA 8
       RT
*
SAVE   LWPI MYWS
       BL   @MOTES
       MOVB @OUTPUT,@FILEMO
       CLR  0
       MOVB 0,@BANKAD
       BL   @GETNAM      Namen holen
       BL   @WRIP        Pab schreiben
       LI   1,WRITE      OPCODE:=Write
       BLWP @VSBW        R0 ist noch VDPAB
*
       MOVB @AUSTRI,@AUSTRI
       JEQ  SANOAU
       LI   0,>0E00
       MOVB @GREREC,@GREREC
       JEQ  SAVF25
       LI   0,>0A00
SAVF25 MOVB 0,@FIRSTW+1
SANOAU LI   0,VDB        "Header"
       LI   1,FIRSTW
       LI   2,2
       BLWP @VMBW
       MOVB @GREREC,@GREREC
       JEQ  SA256
       INCT 0            und
       LI   1,COLTAB     Farbinfo schreiben
       LI   2,32
       BLWP @VMBW
       LI   9,>FC00
       LI   13,34        wricnt
       JMP  SABEID
*
SA256  LI   9,>FF00
       LI   13,2
SABEID
       LI   14,212
SLILOP
       LI   0,HIBAN
       MOVB 0,@BANKAD
       LI   0,212
       S    14,0
       SLA  0,8
       LI   1,PANL
       LI   2,2*DASALE
       BLWP @VMBR        ZEILE LESEN
*
       CLR  0
       MOVB 0,@BANKAD
*
       LI   3,>FFFF
       CLR  4
       CLR  5
       CLR  8
       CLR  6
SAZELO
       MOVB @GREREC,@GREREC
       JEQ  SAZWSF
       MOV  6,7
       SRL  7,1
       MOVB @PANL(7),4
       MOV  6,7
       ANDI 7,1
       JNE  NOFINI
       SRL  4,4
NOFINI ANDI 4,>0F00
       JMP  SAZALL
SAZWSF MOVB @PANL(6),4
SAZALL
       C    3,4
       JNE  SANEFA
       INC  5
       JMP  ZEIND
SANEFA
       MOV  8,8
       JEQ  ERSTES
       BL   @SCHRB
ERSTES SETO 8
       MOV  4,3

ZEIND
       INC  6
       C    6,@GREREC
       JLE  SAZELO
       BL   @SCHRB
*
       DEC  14
       JNE  SLILOP
*
       CLR  1            Fuellen
       LI   3,127
NULU   BL   @TODSK
       DEC  3
       JNE  NULU
*
SAVEX  LI   0,VDPAB
       LI   1,CLOSE
       BLWP @VSBW
       MOV  12,@PNTR
       BLWP @DSRLNK      Close
       DATA 8
       LI   1,VIDSAV
       LI   2,VIBUL
       BLWP @VMBW
       B    @EXIT
*
LOAD   LWPI MYWS
       BL   @MOTES
       MOVB @INPUT,@FILEMO
       CLR  0
       MOVB 0,@BANKAD
       BL   @GETNAM
       BL   @WRIP        Pab schreiben
       LI   1,READ       OPCODE:=Read
       BLWP @VSBW        R0 ist noch VDPAB
*
       MOV  12,@PNTR     "Header"
       BLWP @DSRLNK
       DATA 8
       LI   0,VDB
       LI   1,FIRSTW
       LI   2,2
       BLWP @VMBR
       MOV  0,3
       MOVB @FIRSTW,0    BCKGRND
       SRL  0,8
       AI   0,>0700
       BLWP @VWTR
       MOVB @AUSTRI,@AUSTRI
       JEQ  LOKEEP
       MOV  @FIRSTW,0
       ANDI 0,>F
       BLWP @VWTR        set mode
       LI   1,255
       CI   0,>E
       JEQ  LOGOK
       LI   1,511
LOGOK  MOV  1,@GREREC
LOKEEP MOV  3,0
       MOVB @GREREC,@GREREC
       JEQ  LO256
* 16 Farben Modus
       INCT 0            und
       LI   1,COLTAB     Farbinfo lesen
       LI   2,32
       BLWP @VMBR
*
       CLR  3            Farben definieren
FASCHL MOV  3,0
       AI   0,>1000
       BLWP @VWTR
       MOV  3,4
       SLA  4,1
       MOVB @COLTAB(4),@VDPW2
       MOVB @COLTAB+1(4),@VDPW2
       INC  3
       CI   3,16
       JLT  FASCHL
*
       LI   13,34
*
       LI   9,>FE00      fuer 16
       JMP  LOBEIM
LO256
       LI   13,2
       LI   9,>FF00
LOBEIM
       CLR  5
LEZEIL CLR  6

LESPA  BL   @GETWRD
       MOVB 3,4
       MOVB @GREREC,@GREREC
       JEQ  LZ256
       SRL  4,4
LZ256
       MOV  5,0
       MOV  6,1
       DEC  3            Anzahl maskieren
       SZC  9,3
       JEQ  LOJUUN
       INC  3

       A    3,6
       LI   2,1
LEPLOL BLWP @FUELLE
       JMP  LOKAY
LOJUUN MOVB 4,2
       BLWP @QPOINT
       INC  6
LOKAY
       C    6,@GREREC
       JLE  LESPA
       INC  5
       CI   5,212
       JLT  LEZEIL
*
       B    @SAVEX       alten Zustand wiederherstellen
*
SCHRB  MOV  11,10
       MOVB @GREREC,@GREREC
       JEQ  SCHRB1
       SLA  3,4
SCHRB1 INC  5
       SZCB 9,5
       A    5,3
       MOVB 3,1
       BL   @TODSK
       MOV  3,1
       SLA  1,8
       BL   @TODSK
       CLR  5
       B    *10
*
TODSK
       LI   0,VDB
       A    13,0
       BLWP @VSBW
       INC  13
       CI   13,128
       JLT  NOCHOK
       MOV  12,@PNTR
       BLWP @DSRLNK
       DATA 8
       CLR  13
*
NOCHOK RT
*
GETWRD CI   13,127
       JLT  NOCHDA
       MOV  12,@PNTR
       BLWP @DSRLNK
       DATA 8
       CLR  13
NOCHDA LI   0,VDB
       A    13,0
       LI   1,MYWS+6     trick: ganzes wort in r3 schreiben
       LI   2,2
       BLWP @VMBR
       INCT 13
       RT
*
MOTION LWPI MYWS
       BL   @MOTES
       LI   1,1
       BL   @GETONE
       ANDI 2,>1F
       SLA  2,8
       MOVB 2,@BEWEGE
       MOV  @USRINT,@OIADR  keep old intrpt
       LI   0,INTRPT
       MOV  0,@USRINT    set intrpt
       B    @NOMEX
*
STOP   LWPI MYWS
       BL   @INTAUS
       B    @NOMEX
*
INTAUS LI   0,INTRPT
       C    0,@USRINT
       JNE  INTAND
       MOV  @OIADR,@USRINT
       CLR  0
       MOVB 0,@BEWEGE
INTAND RT
*
OIADR  DATA 0
*
INTRPT MOV  11,@REGBUF
       MOV  @OIADR,8
       JEQ  NOTHER
       BL   *8
NOTHER MOVB @BEWEGE,8
       SRL  8,8
       LI   4,HIBAN
SKOLO  MOV  8,8
       JEQ  INALKO
       MOV  8,2
       DEC  2            AB 0 !
       SLA  2,2
       LI   0,>300
       A    2,0
       SWPB 4
       MOVB 4,@BANKAD
       BLWP @VSBR
       MOVB @VDPRD,3
       AI   0,>F700
       SWPB 4
       MOVB 4,@BANKAD
       BLWP @VSBW
       MOVB 3,@VDPWD
       DEC 8
       JMP SKOLO
INALKO MOV  @REGBUF,11
       LI   0,>0E00
       BLWP @VWTR
       RT
*
ARBAFI LI   0,>100
       BLWP @VSBW
       LI   2,6143
AFILOP MOVB 1,@VDPWD
       DEC  2
       JNE  AFILOP
       RT
*
ARTLES LWPI MYWS
       BL   @MOTES
       CLR  0
       LI   1,1
       LI   2,PABBB-1
       LI   3,>0F00
       MOVB 3,*2
       BLWP @STRREF

       LI   13,>0004
       MOVB 13,@BANKAD
       LI   0,>A000      >3000 AB >A000 retten
       LI   1,>A000
       LI   2,>3000
       BLWP @VMBW
       CLR  0            VDP RAM retten
       LI   2,>2000
       BLWP @VMBR
       LI   0,>D000
       BLWP @VMBW

       LI   2,PABBB-1
       MOVB *2,12
       DEC  2
       INCT *2
       CLR  0
       LI   1,ARTPAB
       LI   2,26
       BLWP @VMBW
       LI   10,9
       MOV  10,@PNTR
       SRL  12,8
       MOV  12,1         SUFFIX
       A    10,1
       MOV  1,0
       INC  0
       LI   2,2
       LI   1,PIC
       BLWP @VMBW
       CLR  1
       BL   @ARBAFI
       BLWP @DSRLNK
       DATA 8
*
       LI   0,>100
       LI   1,>A000
       LI   2,6144
       BLWP @VMBR
*
       MOV  10,@PNTR
       MOV  12,1         SUFFIX
       A    10,1
       MOV  1,0
       INC  0
       LI   2,2
       LI   1,COL
       BLWP @VMBW
       LI   1,>1000
       BL   @ARBAFI
       BLWP @DSRLNK
       DATA 8
*
       LI   0,>100
       LI   1,>B800
       LI   2,6144
       BLWP @VMBR
*
       LI   0,>FFFF
       BLWP @VSBR
       BLWP @VSBW  JUST TO SET WRITE
*
       CLR  3
SELOP  CLR  4
WALOP
       MOV  3,6
       SLA  6,5
       SOC  3,6
       ANDI 6,>FF07
       MOV  4,7
       SLA  7,3
       A    7,6
       MOVB @>A000+6144(6),7
       MOVB @>A000(6),6
*
       LI   5,1
ABLOP
       MOV  7,2
       SLA  6,1
       JNC  NOPIX
       SRL  2,4
NOPIX  ANDI 2,>0F00
       MOVB @GREREC,@GREREC
       JEQ  ARTL25
       MOV  2,1
       SLA  1,4
       A    2,1
       JMP  BYTSCH
ARTL25 SRL  2,8
       MOVB @FAR256(2),1
BYTSCH MOVB 1,@VDPWD
*
       INC  5
       CI   5,9

       JLT  ABLOP
*
       INC  4
       CI   4,32
       JLT  WALOP
*
       INC  3
       CI   3,192
       JLT  SELOP
*

       LI   0,>D000      VDP RAM retten
       LI   1,>A000
       LI   2,>2000
       BLWP @VMBR
       CLR  0
       BLWP @VMBW
       LI   0,>A000      >3000 an >A000 retten
       LI   2,>3000
       BLWP @VMBR
       SWPB 13
       MOVB 13,@BANKAD   wieder 4

       B    @EXIT
*
       END

ORDERFORM

Mail Order Form to: Beery W. Miller
                    5455 Marina Cove #1
                    Memphis, TN 38115
                    USA

Ship to:            _____________________
                    _____________________
                    _____________________
                    _____________________
                    _____________________

Quant  Format   Title      Quant  Format    Title    Quant  Format   Title
_____  ______  _________   _____  ______  _________  _____  ______  _________

_____  DS/SD   GIFNUDE01   _____  DS/SD   GIFTUNE01  _____  DS/SD   MACFLIX14
_____  DS/SD   GIFNUDE02   _____  DS/SD   GIFTUNE02  _____  DS/SD   MACFLIX15
_____  DS/SD   GIFNUDE03   _____  DS/SD   GIFTUNE03  _____  DS/SD  *MACFLIX16
_____  DS/SD   GIFNUDE04   _____  DS/SD   GIFTUNE04  _____  DS/SD  *MACFLIX17
_____  DS/SD   GIFNUDE05   _____  DS/SD   GIFTUNE05  _____  DS/SD  *MACFLIX18
_____  DS/SD   GIFNDUE06   _____  DS/SD   GIFTUNE06  _____  DS/SD  *MACFLIX19
_____  DS/SD   GIFNUDE07   _____  DS/SD   GIFTUNE07  _____  DS/SD  *MACFLIX20
_____  DS/SD   GIFNUDE08   _____  DS/SD   GIFTUNE08  _____  DS/SD  *MACFLIX21
_____  DS/SD   GIFNUDE09   _____  DS/SD   GIFTUNE09  _____  DS/SD  *MACFLIX22
_____  DS/SD   GIFNUDE10   _____  DS/SD   GIFTUNE10  _____  DS/SD  *MACFLIX23
_____  DS/SD   GIFNUDE11   _____  DS/SD   GIFTUNE11  _____  DS/SD  *MACFLIX24
_____  DS/SD   GIFNUDE12   _____  DS/SD   MACFLIX01  _____  DS/SD  *MACFLIX25
_____  DS/SD   C99-MDOS    _____  DS/SD   MACFLIX02  _____  DS/SD  *MACFLIX26
_____  SS/SD   GPLV1-04    _____  DS/SD   MACFLIX03  _____  DS/SD  *MACFLIX27
_____  SS/SD   ASSEMBLY    _____  DS/SD   MACFLIX04  _____  DS/SD  *MACFLIX28
_____  DS/SD   DISNEY01    _____  DS/SD   MACFLIX05  _____  DS/SD  *MACFLIX29
_____  DS/SD   DISNEY02    _____  DS/SD   MACFLIX06  _____  DS/SD  *MACFLIX30
_____  SS/SD   GIF-PGM     _____  DS/SD   MACFLIX07  _____  DS/SD  *MACFLIX31
_____  SS/SD  *BASIC2-99   _____  DS/SD   MACFLIX08  _____  DS/SD  *MACFLIX32
_____  SS/SD  *MDOS1-14F   _____  DS/SD   MACFLIX09  _____  DS/SD   C99MR1
_____  DS/SD  *MDOS0.96H   _____  DS/SD   MACFLIX10  _____  DS/SD  *XHI(V3.41)
_____  SS/SD   SPECS9640   _____  DS/SD   MACFLIX11  _____  DS/SD  *MT9640-SRC
_____  DS/SD  *AFHR-SRC    _____  DS/SD   MACFLIX12  _____  SS/SD   PHOENIX114
_____  DS/SD   MDMV1-29    _____  DS/SD   MACFLIX13
______________________________________________________________________________
* New files since Vol 1 #3 of 9640 News



Total #:     _______ Disks
                     @ $2.50 each (US/Canada)
                     @ $4.00 each (Foreign delivery)

Amount Paid $_______ (Check or money order)


Note:     The following statement must be signed before I
          will ship any of the above software.

          Some or part of the programs I order may be
classified as Fairware, Shareware, or Pay-Me-Ware programs.
I understand that if I order and use any programs on a
regular basis, that the author of such program has required
me to pay him his fee for the program besides any fees that
"9640 News" has collected for shipping and handling costs.
Copywrighted programs by Myarc, Inc have been placed onto
public domain services and do not require any fees.  Public
domain programs require no additional fees unless you wish
to display your generosity for that person's work.


         _________________________ (your signature and date)



______________________________________________________________________________


Total #:     _______ Disks
                     @ $2.50 each (US/Canada)
                     @ $4.00 each (Foreign delivery)

Amount Paid $_______ (Check or money order)



         _________________________ (your signature and date)


Thank you for your order.
Beery W. Miller (9640 News)


XHIDOC

Alicomputer Wuppertal Software Systems presents :

XHi

Extended Basic High-Resolution Graphics Support

(C) 1988 by Alexander Hulpke
Software for the Myarc GENEVE 9640 Computer
and the TI-99/4A with 9938 Advanced VDP Chip!

ACW XHi Version 3.41

Introduction

The Yamaha V9938 Video Processor, which is build into the GENEVE, does provide a large variety of Graphic Modes. Unfortunately, the software support for these Modes is worse: MDOS, MYWord, Multiplan and the yet bug-stuffed Advanced Basic (in fact yet only XBasic Level IV) may use the 80 characters per line mode, but the fantastic HI-Resolution graphic with up to 424 x 512 Points in 16 Colours are only used by the title swan and by MYArt, the later you have to buy separately. The often-used TI-Extended Basic will run only in the Video-Game-like Graphics-Mode (This Mode is called Graphics 1 regarding the 9938). The regular Version of Advanced Basic, that will support HiRes graphics will be released (since about one year...) perhaps in a few month, but those programs will not run on the TI !

The Assembler Program XHi was designed to solve these problems. It provides the following facilities:

  1. You may use the Graphics-6 Mode with an resolution of 212 x 512 Points in 16 colors AND the Graphics-7 Mode with 256 Colors and a resolution of 212 x 256 . (An implementation of the interlace Mode with an vertical resolution of 424 points is discussed in the Appendix.)

  2. The program runs out of the Extended Basic Environment, you may call the routines by simple CALL LINK commands.

  3. Though TI-Extended Basic utilizes an huge part of the VDP-Ram for his own uses, the graphic is visible on the screen all the time. You do not need to call an picture-display-routine.

  4. The Basic Program runs without disturbing the picture, because Basic uses his "own" screen on which all TI graphics commands are executed.

  5. You may redefine the Colors, choosing from a possible 512.

  6. The Picture may be stored on any device by simple SAVE and LOAD calls. The storage format is compatible with MyArt.

  7. XHi needs only the 9938 Advanced VDP Chip. It will run also on an TI with this VDP, for example with the Mechatronic 80-Zeichen Karte or the DIJIT AVDP card.

  8. The source-code is provided, so you may change the program, as you want. See appendix for suggested improvements and changes.

  9. The supplemental Hardcopy allows the printout of MyArt pictures in grey shades in much better quality than MyArt itself. You may choose the size from as small as a stamp to as large as you can imagine.

Fairware Information

This program is provided on a FAIRWARE Basis. You may copy the program and give it to your friends, if the required money does not exceed the cost of the disk, mailer and postage. Also it is required, that the program header and this Fairware Information are not modified, or removed. If you are using this program, and find it of value, I would appreciate your one-time donation. Send me, what you think this program is worth, to become an registered user of XHi. You may use XHi in your programs as you want. If you distribute these programs, please include information about this fact.

If you want to obtain a version of XHi, your request should include one formatted disk (DSSD) in a mailer and return postage or 7 DM or equivalent in US$ for air mail delivery.

Please mail all correspondence regarding XHi to:

Alexander Hulpke
Sadowastrasse 68
5600 Wuppertal 1
West Germany

If you have questions regarding XHi, please send me an self-adressed envelope and return postage. I will try to respond to every request.

Please indicate in your letter the number of the version, you are using, since there may be a new version, and possible errors may be fixed. If you found an error, please send me an copy of the file, that caused this error.

Please indicate also your system configuration. This will help me perfecting XHi, since I will see, which Hardware XHi should support.

I included nearly all sourcecodes on this disk. This is simply because, everyone, who can read my poorly documented assembler, can also use the DisKassembler. I hate it, if I want to change some program, but this is not possible, because I have no source-code. I hope you will encourage this policy of giving all program-related information and (source-)code , and you will also offer source code of your programs.

One important thing: Please do not distribute your modified version of XHi. This is simply to avoid changes, that are not compatible with other versions. If you fixed a bug, send me this change, and I will include it in a new version.

Have as much fun using XHi, as I had, writing it!

Loading and using

Loading XHi

XHi is an Assembler program in tagged code form. You should load XHi only from TI-Extended Basic, because it uses frequently the NUMREF, STRREF, NUMASG and ERR routines. In TI-Basic or Myarc Advanced Basic this may cause errors and you will have to switch off the computer and to reboot the system. To load XHi, simply enter CALL INIT and CALL LOAD("DSKx.XHI"). Alternatively, you may run LOAD, that has XHi built in by Barry Boones SysTex, so don't edit the first 9 lines ! If you press any key while LOADing, the program will stop after loading XHi and not display the menu.

After you loaded XHi the program will reside in memory, until you leave Basic/XBasic, enter CALL INIT or overwrite the program with CALL LOAD. See Appendix for Informations on how to install XHi on other Hardware. One Important Fact: XHi was written with XBasic V. 110. Since it uses almost only the "official" interface (only XMLLNK is used in a more direct way), it should run also with the other Extended Basics for the TI, that provide the same assembler environment. Problems may occur, if you try to use it with Myarc's Advanced Basic or similar.

Using XHi

After you loaded XHi, you may use three screens for output: The Graphics-1 XBasic screen and the Graphics-6 and Graphics-7 HiRes screens. Output to the Basic screen does not affect the HiRes graphics and vice versa. All original XBasic commands will send output to the XBasic screen. This may be done all the time, even if you display the HiRes screen. To display on the HiRes screen, you must be in the HiRes mode. Each screen will exist, even if the other one is displayed. You may print text in XBasic, display a function on the HiRes screen, switch back to the XBasic screen (the text you wrote will be still on it!), input aome data, switch back to the HiRes screen and display another function over the restored screen. Since the commands for the both HiRes modes are identical, they are descripted simultaneously. Each reference to HiRes mode describes both screens. The only difference is: G6 allows Colors from 1 to 16 and HCOOR from 0 to 511; G7 colors and HCOOR from 0 to 255. In both modes VCOOR is from 0 to 211. The coordinates for sprites are from 0 to 255. All XHi commands are executed by CALL LINK routines. Parameters in [] Brackets are optional :

The following 6 routines treat the VIewPORT as block:

The following 5 commands work nearly the same as the corresponding Extended Basic subprograms. The original statements will display sprites only on the XBasic screen, only CALL MAGNIFY works on both screens:

The Disk commands use the file respecting the mode, you chose. Note that I/O checking is recently not done.

The command CALL SCREEN and CALL MAGNIFY still work the same, since they write only to VDP Registers. You may use them for all screens. However, you should use the BACK routine, since CALL SCREEN allows only 16 colors in G7 Mode, and the BACK Code will be used by SAVE (See 3.1).

Note, that nearly all commands (except - of course - HIRES, HICLR, MOD256, CLR256 and COLMIX, PAT0AR, CWIDTH) will work only in the HiRes mode. If you try to use a command, while being in the wrong screen-mode, XBasic will issue
an IMAGE ERROR.

Logical operations

To every command, you may add color, you may additionally add an logical operation. This operation is performed with the color to set and the color of the screen position. Mode switches and the Expand and Reduce commands will reset this operation. otherwise, it will remain effective, until you change it. This may have strange effects on the graphics, since all Screen output is affected by this operations. For example LOADing with @or will not erase the previous picture.

The operations are:

    Nr. | Name | Operation
    ----+------+-------------------------------------------------
      0 | IMP  | DC=SC
      1 | AND  | DC=SC AND DC
      2 | OR   | DC=SC OR  DC
      3 | XOR  | DC=(NOT(SC) AND DC) OR (SC AND NOT(DC))
      4 | NOT  | DC=NOT(SC)
      5 | ---  | unused (these 3 have no effect on the screen)
      6 | ---  | unused
      7 | ---  | unused

If you add 8 to the Number you will get conditional operations: If SC=0 DC will remain, otherwise the operation will be executed.

Side Effects and Limitations

Unfortunately, Texas Instruments designed the XBasic Module only for use in Graphics-1 Mode. The remaining part of the VDP-Ram is used for PAB's, strings and program parts. XHi uses the upper 64k of the VDP RAM. It changes only the contents of the VDP registers, but it does not change the Basic. Every time, an statement is executed, and control returns to the "direct mode", XBasic restores colors, characters and some VDP-registers. This will change the parameters used to display the HiRes screen. So you can use HiRes graphics only in a program, which should switch back to normal mode before it stops executing. If an error occurs, while HiRes is displayed, The error message is displayed on the XBasic screen, and the HiRes screen will be disturbed. In this case, you should return to NORMAL mode to read the error message and regain an display. An somehow better solution could be to use an ON ERROR routine. Note that the same effects occur, if you press CLEAR [F4/ALT-4] in HiRes mode. You should @NEVER press CTL-ALT-DEL or CTL-SHFT-SHFT, while in the HiRes Mode. These Key combinations leave Extended Basic without restoring the VDP Registers properly. So it may be neccessary, to reenter Extended Basic to restore the NORMAL screen.

If you use CIRCLE (especially with radius bigger 255) or COPY with parts outside the screen, XHi may paint these parts on the screen. Also, you should @never set an VIewPORT (partially) outside the screen. This may damage your picture and the XBasic environment. The coordinates of the last pixel, used for DRAWTO are set by some routines in an strange way. For example, LINE will take the @first coordinates as last pixel. Even commands, as VIPORT or GETPIX will set the last pixel coordinates. You may find these coordinates by searching in the @patch^area of XHI (see section 5.3). CLS and all mode switches will reset the VIewPORT.

You may not use any longer the SAVE and LOAD routines from the XBasic screen. This change was necessary, since there is no use of banked RAM. Older Versions of XHi will not run on the TI and disturb the Geneve's RAMDisk in GPL V 1.01. These problems have been removed since Version 1.3. Note, that XHi now uses the MyArt storage format. If you try to load pictures in the old format (though D/V128), XHi may become @very confused. Don't panic, we were so smart, to include the TOMYART conversion program. Be careful with MOTION. As stated above, an incorrect resetting of several interrupt routines will end the computer in nirwana. ARTLES has problems with the color transparent, since this color is light blue in the Artist, but black in XHi. You should redefine color 1, respectively choose another background color , to regard the picture. this will also save all problems when loading those files in MyArt. An somehow better solution is to avoid the use of transparent in Artist pictures. You should also know, that ARTLES uses >A000 to >EFFF of the lower 64k of the VDP RAM for internal storage to allow return to XBasic. If you have own routines, that use this area, their data will be erased! If Barry Boones MyArt Loader will not display your pictures correctly, you should refer to section 3.1, since this loader contains a bug: There are some pictures, that it cannot display!

How it works

As stated in the preceeding sections, XBasic and the TI Operating System use nearly the whole 16k VDP-RAM. This is only 1 bank (of 8) of the 128k VDP-RAM in the Geneve. XHi uses the last 4 banks of the VDP RAM for the HiResolution graphics. Since this Version does not store the HiRes screen in the banked RAM of the Geneve, there is no possibility to access the HiRes Picture from the XBasic screen mode. Since XHi changes only VDP Registers, which XBasic does not read (It could not, even if it liked to), but leaves the low 16k Bank unaffected, XBasic will still run, not mentioning the HighRes Screen.

The VDP has special commands for point, line, fill etc. Fortunately, I recently got the 9938 manual, so XHi is now using these commands. This helps supporting the G7 mode, since the only difference in access is the different setting of V0 and the right border. Since the VDP does not support any viewport, I decided to keep the old LINE routine in use, though this might be replaced by the VDP LINE command. Since there's no difference in speed between these two alternatives, I rated compatibility higher. The use of the blockfill routine has increased the LOAD speed iin V. 3.1

Circles are painted by the pythagorean algorithm (dx * 2+dy * 2=radius * 2), the square root is calculated by searching it bit by bit. This has proved to be simple and quick enough.

You may have noted, that the TI XBasic utility routines may access only 16k VDP-RAM. XHi contains new routines, which will set the correct bank itself. You only have to set a byte, regarding which half of the VDP-RAM you want, since 16 Bit (1 TMS9900 register) may decode only 64k. See Appendix 5.4 for using these routines.

The MyArt storage format

The older versions of XHi used and very direct format, called "213 sector screen dump". This format was very disk space consuming. Since V. 2.0 The MyArt storage format is used, which needs much less space. The TOMYART Program on this disk will convert your old Picture Files. The MyArt format is not very complicated:

The File is stored in D/V128 format, since this allows the best sector usage. You may also read it from Basic, without any problems with length bytes, like when reading JOYPAINT Files.

The file starts with a two byte "magic word". The first byte is (I guess, you may state this, though it's not an official information) the background color. Since there is no official interpretation of the second byte, that works, I will tell several possible interpretations. MyArt itself writes in the second byte a version-dependend number (>FA/>9E). I know of three loaders, that will interpret it, and select the displaymode according to it: Advanced Basic has an "CALL MYART" command, that works nearly always. By playing round, I found, that it does not need the first word, but interprets the entire file. The other two really interpret the Header word: Barry Boones MyArt Loader uses >FF as Indication of G6 Pictures. The Myload Loader from Austria uses the last Nybble as value for VDP Reg 0. Since I prefer the last format, XHi may incorporate it, if you select the AUSTRI Byte in the patch area. Simply set it to 255 to use this format (LOADing instead of changing the program is recommended). Be prepared, that you might not be able to load older pictures after that change. Normally XHi will only support the color byte and keep the other byte. So you may set it as you like by LOADing in the patch area, for example if you want to create pictures for Barry's Loader.

In G6 mode follows an 16-word area with all color definitions. XHi uses the stored definitions from the patch area, since there is no provision for reading the color palette. Up to the end of the File, there are words, that are read in the following way: In G6 mode the first nybble, in G7 mode the first byte, selects any color, the rest of the word sets the number of pixels, this color occupies. A length of 0 in G7 mode means 256. There is no pixel-line skipping screen lines. If you regard a file with some DiskEditor, you will easily see this.

Hardcopy

This Version of XHi includes the first official release of the Hardcopy program, which allows the easy printout of MyArt type graphics. The use is very simple. First, you should run HCSETUP in Basic. This program will create an Printer Setup file. Since I have only an FX-85, only the EPSON Setup has been tested. The programm has been tested succesfully on the following printers: EPSON FX85, LX800, RX 80F/T+, PANASONIC KX-P1091; others you might need to set up by yourself. Note, that the last code, prompted by HCSETUP (Backward feed) is not used at the moment, but included for future expansion. You start the Hardcopy with any EA5 Loader or use HCLOAD from XBasic. It loads CHARA1 from DSK1 and searches drive 1,2 and 5 for the HC#SU setup file. If no file is found, the codes for EPSON FX85/PIO are used. Now you should input the filename. The program will load the header, and display the mode, it thinks the file is in. You may change this with <1> or <2>, will select it. After this, you enter the color definition menu. Select Color with / or /Number/ENTER. On the right side, the pattern, that will be printed is displayed. / or direct number input will select the pattern. ENTER goes to the main menu:

Playing around, you will also notice the background color mode indication (at least, if you posess an color monitor): Normal background is dark blue. The color/pattern definition is dark green, Table LOAD/SAVE is dark red and printout is simply black. So you can see easily, what mode HARDCOPY is in.

When you have selected the mode, you will see on the lower edge of the screen the "First color code" of the picture. Since the first code is nearly almost the code of the background color, you can easily lighten that color, producing an better output. Remember always, that a printout is a different thing than an screen display. On the screen, a light color on black is very good to read, but nobody would recommend this for printed text. This is very similar for graphics: A black background looks perfectly on the screen, on paper, it will nearly always darken the entire picture, making it much like the famous "two negros in a tunnel at midnight".

Black is the natural screen color, white is the same for paper. Lightening the background color will often enhance the result of the printout. When you print pictures with colors with similar pattern codes nearby, especially if the codes are lower than 128, you should set the S flag. The same applies always to G7 pictures, where the S flag will also prevent the horizontal squeezing. For some G7 pictures it may be necessary, to create a new file with color/pattern codes that represent better the brightness of each color, also if that may result in identical codes for some colors.

As expectable, large areas with one color will print out perfectly, some digitized stuff may create funny results.

The quality will usually increase, if you print magnified, because this creates automatically large areas of one color.

Sometimes a hardcopy is the wrong thing, to use a new printer ribbon on: If you have a large color-scale, the darker colors are much better to distinct, if your ribbon has been used some time. Otherwise, all dark colors become fantastically black. If you print pictures with hard color differences, it is of course a good idea, to use a new ribbon.

The hardcopy should even run on a TI @without 9938 AVDP. Naturally, you cannot see the mixed colors, and there may be some disturbances on the screen, but the printout should work perfectly.

If you are interested in the Way, Hardcopy works, you should refer to [4], where the "Ordered Dither" Algorithm is descripted.

Appendix

The color definition Utility

The program COLDEF on your XHi disk will let you create your own colorset. This can be done simply by "moving" the intensity for red, green and blue. COLDEF is handled by the Cursor pad, PROC'D (F6) and BEGIN. Use the cursor keys to move the arrow. Select the color by pressing HOME. The background will now display the selected color. Now you may change the color by selecting the red, green or blue intensity and changing it with arrow up/down. Note that only the background will change its color. This is done, because otherwise it could be possible to select colors, which will not allow the displaying of the color selecting bars. If the color is OK press HOME to store the color internally, or press F9 to keep the old color definition. Now you may select another color or press PROC'D to write the color definitions in the VDP and finish the program. If you press BEGIN, the original color definitions are loaded. Pressing ESC will cause the program to stop, without changing the colors.

The original color definitions

         Standard colors                   X Sprite color in G7 mode/
                            X Standard MyArt Colors in G6 mode
    Nr | Color        | Red | Green | Blue X Color        | Rot | Green | Blue
    ---+--------------+-----+-------+------+--------------+-----+-------+-----
     0 | Transparent+ |  0  |   0   |   0  X Transparent+ |  0  |   0   |  0  
     1 | Black        |  0  |   0   |   0  X Blue         |  0  |   0   |  2  
     2 | Green        |  1  |   6   |   1  X Red          |  3  |   0   |  0  
     3 | Light green  |  3  |   7   |   3  X Violet       |  3  |   0   |  2  
     4 | Dark blue    |  1  |   1   |   7  X Green        |  0  |   3   |  0  
     5 | Blue         |  2  |   3   |   7  X Turquoise    |  0  |   3   |  2  
     6 | Dark red     |  5  |   1   |   1  X Olive-green  |  3  |   3   |  0  
     7 | Cyan         |  2  |   6   |   7  X Grey         |  3  |   3   |  2  
     8 | Red          |  7  |   1   |   1  X Beige        |  7  |   4   |  2  
     9 | Light red    |  7  |   3   |   3  X Light blue   |  0  |   0   |  7  
    10 | Dark yellow  |  6  |   6   |   1  X Light red    |  7  |   0   |  0  
    11 | Light yellow |  6  |   6   |   4  X Pink         |  7  |   0   |  7  
    12 | Dark green   |  1  |   4   |   1  X Light green  |  0  |   7   |  0  
    13 | Magneta      |  6  |   2   |   5  X Cyan         |  0  |   7   |  7  
    14 | Grey         |  5  |   5   |   5  X Yellow       |  7  |   7   |  0  
    15 | White        |  7  |   7   |   7  X White        |  7  |   7   |  7  

Note: Add 1 to get Basic color code. + If you change color 0, this new color will be displayed only if the screen color is set to 0, for example with CALL SCREEN(1). To use this color as any other, you must set Bit 5 in VDP R8.

The Patch area

As many other programs, also XHI has an so called Patch area, in that it stores informations, which can be altered. Most commands, which do not affect the screen immediatey as VIPORT or CWIDTH simply write a new value into this area. By peeking the values, you may get those values, or you may change them with CALL LOAD. Since this area also stores Information about the graphics mode in use, this may be dangerous, and you may lock up the computer. You should access this area only, if you are sure, what you do. To access the patch area, use CALL LINK("PAT0AR",A) to get the start adress.

To get or change those informations, simply PEEK the data of the corresponding adress. Here is an part of the source code, showing the use of PAT0AR :

    OGC    EQU 0             Upper Border Viewport Standard
    UGC    EQU 211           Lower   "        "        "
    LGC    EQU 0             Left    "        "        "
    RGC    EQU 511           Right   "        "        "
     
>   PAT0AR B     PATGET      Routine to get the adress of PAT0AR
    BANKAD BYTE 0            VDP-Bank (Only internal use for VDP access)
    COLOR  BYTE 0            Painting color
    REGBUF DATA 0            Register buffer, only internally used
    GRMOD  DATA 0            Graphics Mode (0=XBasic/FFFF=HiRes)
    LASTX  DATA 0            Last used coordinates
    LASTY  DATA 0            (used for DRAWTO)
    OGM    DATA OGC          Viewport Border UP
    UGM    DATA UGC                          DOWN
    LGM    DATA LGC                          LEFT
    RGM    DATA RGC                          RIGHT
    SKIP   DATA 8            Character width

       The color definitions :

    COLTAB DATA >RB0G  (Transparent) \
                                      } 16 Word area
           DATA >RB0G  (White)       /
     
    VERSIO BYTE >XY  Version number  V. X.Y : Byte >30
    LOGOP  BYTE 0    Logical operation code, see section 2.3
     
    FIRSTW DATA >FF0E "magic word", Header of all Picture Files.
      See section 3.1 on the interpretation of this word

    GREREC DATA 511  Right Border (In G7 mode 255)
      Note that this cell allows you to find which HiRes mode has been
      selected: If the First byte is 1, it is G6, if it is 0, G7

    EINSB  BYTE 1  internal use, may change in the future
    PAL    BYTE 0  may select PAL display. See section 5.9 on this topic.
    BEWEGE BYTE 0  The number specified in MOTION
    AUSTRI BYTE 0  This Byte selects the Austrian Header. See section 3.1

    FAR256 BYTE 0   \      16 Byte Area of G7 color replacement
           BYTE 255 /      used by ARTLES

    STDCOL DATA      The same 32 Byte Area as Coltab. Used by COLRES

      The PAB is no longer part of the PATCH AREA, since you should not change
      the storage format.

Routines for VDP Access

The standard TI VDP Routines will access only 16k of VDP RAM. This is the adress space of the TMS 9918.Even with VDPWA you will not be able to access more than these 16k. The whole VDP RAM is banked in 16k blocks, which are selected by VDP R14.The following routines will allow an access of the whole VDP RAM. These routines are fully compatible with the original ones. Since 16 Bit in R0 can adress only 64k, you may give an Offset in the BANKAD byte. For example, if you set BANKAD to >04, the routines will cover the upper 64k of VDP RAM. Note, that you cannot use more than 16k VDP RAM, if you are in the TMS 9918 compatible modes. Unfortunately, these modes use not the first 16k of the VDP RAM, but at least full 64k, since they adress only every 4th byte or so. (This is not an official information, I found this problem, while programming XHi. This may be because of some silly programming error of mine. Nevertheless, you should know this fact.

The routines:

                             Improved support routines
                             for 128k VDP RAM
    VSBW   DATA BLWS,VSBW1   (BLWS is an BSS 32 area, the BLWP Workspace)
    VMBW   DATA BLWS,VMBW1   (Note that BLWS @must start at an EVEN adress!)
    VSBR   DATA BLWS,VSBR1
    VMBR   DATA BLWS,VMBR1
    VWTR   DATA BLWS,VWTR1
     
    VSBW1  BL    VWAUB
           MOVB 1, VDPWD     write byte
           RTWP
     
    VMBW1  BL    VWAUB
    VMWL   MOVB  1+, VDPWD   write byte, if you reach a new bank, this
           DEC  2            bank will be used (only in not 9918 modes)
           JNE  VMWL
           RTWP
     
    VSBR1  BL    VRAUB
           MOVB  VDPRD, 2(13)   read byte
           RTWP
     
    VMBR1  BL    VRAUB
    VMRL   MOVB  VDPRD, 1+   read byte (see comment near VMBW1)
           DEC  2
           JNE  VMRL
           RTWP
.BP
    VWAUB  LI   2,>4000      Bit for VDP-write
           JMP  VAUB
    VRAUB  CLR  2
    VAUB
           MOV  13,0
           MOV  0,1
           ANDI 1,>3FFF       mask 16k Bits
           SRL  0,6           bank select
           ANDI 0,>0300
           AB   BANKAD,0     add bank offset
           MOVB 0, VDPWA      set VDP R14
           LI   0,>8E00
           MOVB 0, VDPWA
           SOC  2,1           If neccessary set write Bit
           MOVB BLWS+3, VDPWA  write adress
           MOVB 1, VDPWA
           MOV  2(13),1       transfer R1&
           MOV  4(13),2                R2
           RT
     
    VWTR1  MOV  13,0          identical with TI
           MOVB 1(13), VDPWA
           ORI  0,>8000
           MOVB 0,VDPWA
           RTWP

The Sprite Mode II

The HiRes screen in XHI uses the sprite mode 2. This mode provides several improvements, compared with the mode 1, that is used in the 9918 compatible modes.

In this new mode too, there are only 32 Sprites. Also the coordinates have remained: There are only 256 horizontal positions for a sprite (one Sprite pixel has the double width of on screen pixel).

The changes: In each line on the screen, there may be 8 sprites simultaneously instead of only 4). For each line of the sprite, you may set the own color and similar attributes. This is done in XHi by giving an 16 byte Hex string (32 characters length) to the appropriate routine. Each byte corresponds to one line of the sprite:

       Bit  0 1 2 3 | 4 5 6 7
            | | | | \ color number (Basic color code minus one)
            | | | \-- unused
            | | \---- Ignore collisions
            | \------ Ignore collisions and sprite priority
            |         (The colors are OR-ed)
            \-------- Move sprite line 32 pixel to the left (early clock bit)

Note that in the sprite mode 1, there is one Byte of this kind for the whole sprite. this byte still is in the VDP RAM, but in mode 2 it is unused. In G7 mode you may only use the fixed colors, described in section 5.2.

Color Numbers in 256 color mode

In G7 mode, you may set the red/green and blue part seperately for each screen pixel. It is done as follows:

(MSB) GGG RRR BB (LSB)

Note that you may set 8 intensities of red and green, but only 4 of blue, since
one byte allows only 8 Bits.

XHi on the TI

XHi is the only program to provide the same excellent programmable graphics on all 9938 Hardware, but if you are using XHi on a TI 99/4A, you may encounter several problems. This is mostly because, XHi has been written on and for the Geneve; the first Versions even did not run on the TI. Since the use of the banked RAM has been eliminated in V^1.3 XHi itself should run - perhaps a bit slower - on the TI without any problems, if an 9938 is installed at the standard VDP adresses. It has been tested on the 80 Zeichen Karte and on the DIJIT AVDP Board. The problems will be with the other files:

Firstly, all Textfiles are enormeously big, in fact too big, to load them in the E/A Editor. I have not checked TI Writer, it is possible, that they will fit there. Since MyWord on the Geneve has about 50k of free memory, There was no need of shortening or cutting the files in several pieces. It may be neccessary to divide the files on the TI.

Secondly, all Texts were written with MyWord, and are ment to be printed with MyWord. As far as I know, The Formatter is identical with the US Version of TI Writer (I never bought TI Writer, so I cannot decide this).

Thirdly, you may encounter problems with some Keys, the Geneve has, but which the TI has not. The FCTN Key is called ALT on the Geneve; there are extra Function Keys for FCTN1 to FCTN 10, called F1 to F10.

I have changed LOAD and COLDEF, so that you can replace ENTER for HOME and FCTN-9 for ESC. You also should read CTRL-ALT-DEL and CTRL-SHFT-SHFT as FCTN-= or pressing the reset button, since the effect on XHi is the same.

Finally, there is one program, that cannot run on the TI, since it uses the Geneve's clock chip: UHR. Since the TI has no real time clock aboard, there is no possibility for easy change of this program.

If you live in an PAL-TV area, it may be necessary, to set the PAL Byte to >02 for correct display. (See Appendix 5.8)

Programming the screen display

In the VDP Register 9, there are some bits, which affect the screen
display, that are normally not set. If you posess a Geneve, you may set
two of them with CTL-SHFT-ALT, on the TI there is no such provision. If
you want jittering of the picture, or to squeeze it vertically, you can
change the soucecode to do so. Alternatively, the PAL Byte will be ORed in,
whenever accessing VDP9, so you may for example set PAL byt setting the PAL
Byte in the Patch-area to >02:

The TOMYART conversion utility

You may be curious, how to convert your old picture files. DON'T PANIC, we included TOMYART. Since I hate writing input routines in assembler, you must use it from XBasic with CALL LINK. Enter CALL INIT, load TOMYART and type CALL^LINK("TOMART",OLDFILE$,NEWFILE$). The conversion will be done on the screen, don't worry about some strange behaviour. Since the heading color data is written in the data buffer, you may not use this program twice. Therefore, it returns to the title screen. You must reenter XBasic, enter CALL INIT, and reload TOMYART.

Changes to former Versions

Since the first Version, there have been several changes in XHi, that may affect program execution. Especially, bugs have been removed, and speed has been improved (compare FILSCR in 1.1 and 1.2 to see this). The following paragraph is an short "history" of XHi:

Though it contains a lot of routines, useful to create graphics XHi is never finished. There are a lot of routines, that may be included in future versions. Suggestions are:

You should not mix up the Versions of XHi: Older programs will work with newer versions of XHi, but not vice versa. If you are not sure, check the VERSIO Byte in the patch area.

Since there has been extensive testing also by users of the previous versions, XHi should be relatively bug free. Nevertheless, if there may be a bug lurking inside, let me know.

Many thanks to Mike Dodd for informations, I got in his Geneve coloumn; to Martin Zeddies for useful information about the 9938; Dee Turner sent informations about the MyArt Format. Alfred Gasperi did more for distributing XHi than anyone else.

Many thanks also to all contributing users, who have supported the development. Without all their contributions XHi never would have been written.

Literature References

[1] MSX Video Data Processor V9938 User's Manual
[2] Das MSX Buch, Sybex, Duesseldorf
[3] Martin Gisser: Spiegel-Grafik, c't 1/86, p. 104ff
[4] Thomas Bieber: Pixel-Domino, c't 3/88, p. 170ff
[5] Mike Dodd: Color-Selector, MICROpendium, May 88, p. 27f and several other colums of his.
[6] Reinhard Jurk: Fixsterne, Computer Persoenlich 15/83, p. 76f

Also the Handbooks of Extended Basic, Editor/Assembler, the 9640 Computer, the EPSON FX-85 and the STAR SG-10 Printers.