DIY: 80 column WordPak board (CRT9128)

A place to discuss everything Dragon related that doesn't fall into the other categories.
pser1
Posts: 1655
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: DIY: 80 column WordPak board (CRT9128)

Post by pser1 »

Thanks Ken,
I opened the file and saw something a bit strange:

Code: Select all

START			LDU		BADDR			
				LEAX		FORPAR,PCR	
NA3			CLRB						
LOOP1			LDD		,X++			
				STA		1,U			
				STB		,U           
				INCB                  
				CMPB		#6				
				BCS		LOOP1        

This is the init part, to configure the chip CRT9128.
It is strange to use the register B as a Loop control when we are using the register D to load data from the table FORPAR, so B gets modified inside the loop.
Thanks God, it does four loops and then breaks because B is assigned value $80 (greater than $06), so the CURLO and CURHI are not configured.
I assume that by defaut their value is $00.
By now I'm reading and re-reading the CRT9128 datasheet to understand what is it able to do and hope this will help me understand what Luis has coded in that drive.
I am retyping the driver on DskDream little by little, testing step by step to figure out how it works.
By the way, I have noticed that if I type on the Dragon normal screen EXEC&H7D04 another time, then the computer hangs and Reset doesn't bring it back to life, so I need to stop the Dragon and restart again

regards
pere
KenH
Posts: 182
Joined: Fri Oct 12, 2012 9:50 am

Re: DIY: 80 column WordPak board (CRT9128)

Post by KenH »

I believe that Luis's driver is an adaptation of the original 1984 WordPak driver source code which is documented on page 17 here:
http://www.colorcomputerarchive.com/coc ... 20Inc).pdf
pser1
Posts: 1655
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: DIY: 80 column WordPak board (CRT9128)

Post by pser1 »

very interesting, I see that it is based on an older SY6845 video chip.
The driver there has not the loop control error.
Once known what it does, it will be easy to adapt to the CRT9128
thanks again
regards
pere
pser1
Posts: 1655
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: DIY: 80 column WordPak board (CRT9128)

Post by pser1 »

hello,
Rolo told me to show some pictures of the Dragon with the Tandy MultiPack.
I have had the time to take them while working with the WordPak 80x24, so I attach them off the text due to their size.
In next post I will talk about the driver.
regards
pere
Attachments
Full set with screen B&W 80x24
Full set with screen B&W 80x24
Set03 Far Screen 80x24.jpg (561.94 KiB) Viewed 5333 times
Tandy Multipack with Lafumat controller, Rolo multi-ROM cartridge and WordPak 80x24
Tandy Multipack with Lafumat controller, Rolo multi-ROM cartridge and WordPak 80x24
Set02 MultiPak-Lafumat-Rolo-WordPak.jpg (492.03 KiB) Viewed 5333 times
Dragon64 with Tandy Multipack 26-3124
Dragon64 with Tandy Multipack 26-3124
Set01 Dragon-Multipak.jpg (515.34 KiB) Viewed 5333 times
pser1
Posts: 1655
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: DIY: 80 column WordPak board (CRT9128)

Post by pser1 »

well, now let's talk about the driver ....
first things first. Ken, thanks a lot for your modified driver and the asm source, and too for the link to the CoCo WordPak article, everything of great help!
I have seen that Luis made only half the redirection of the Interpreter hook, so you said that just deleting one line of code the program didn't hang (right).
By comparing to the article, I have completed that hook and now the new version is able to treat the PRINT@ order as well.
At the same time, I saw that if you execute &H7D04 again the program hangs because you redirect the program to himself (the systems hooks point to it from the very first run, so you get a loop)
I have added a control and if the program is installed then it uninstalls itself (by now this runs ok for me)
I have copied the rest ot the code with very few changes.
I works good enough for me, but ....
1) If you have a disc with a lot of programs, then the command DIR will send some lines on a first pack and when you press any key, it will send the rest.
I have on my real Dragon the lafumat controller, so DOS4.1 (Eurohard), and the problem is that the first line of the second pack is NOT printed in a new line but in the same where the last one was printed!
You can see this in pictures 5 and 6.
2) Having activated the PRINT@, it turns out that it is controlled partially. You see that in pictures 7 (old driver) and 8 (new one). The old driver didn't catch @, so the text is printed on the next line.
The new driver goes to the line, but fails to go to the right column (must give a deeper look at the code)
regards
pere
Attachments
PRINT@ with hook activated
PRINT@ with hook activated
Set08 Print@ hook activated.jpg (222.37 KiB) Viewed 5330 times
PRINT@ with old driver
PRINT@ with old driver
Set07 Print@ old driver.jpg (217.78 KiB) Viewed 5330 times
Second part of the long DIR (error)
Second part of the long DIR (error)
Set06 Dir (long) 2nd part.jpg (396.04 KiB) Viewed 5330 times
First part of a long DIR
First part of a long DIR
Set05 Dir (long) 1st part.jpg (421.05 KiB) Viewed 5330 times
Normal 80x24 screen
Normal 80x24 screen
Set04 Screen 80x24.jpg (390.69 KiB) Viewed 5330 times
KenH
Posts: 182
Joined: Fri Oct 12, 2012 9:50 am

Re: DIY: 80 column WordPak board (CRT9128)

Post by KenH »

Hi pere,
Great progress and nice pictures!
I hope you manage to get the PRINT @ command fully working. That would be a great improvement to the WordPak driver.
Ken
pser1
Posts: 1655
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: DIY: 80 column WordPak board (CRT9128)

Post by pser1 »

Hello Ken,
finally, I got something working!
I have made some changes to the driver, specially in defining what has to be at TOPPOS, CURPOS and LINPOS. Once done it seems that the very first char goes to the right place.
The biggest problem with PRINT@ is that the routine is called when Basic has just read the PRINT token and at this moment the Interpreter has not computed the place where the string is to placed, and the place can be defined with decimals numbers, octal ones, hexadecimal or combinations with operators and, to me, it would be a waste of time adding a subroutine able to work with all of this stuff.
So I have decided to set a flag when the sign @ is received and as soon as the first char to be printed arrives, then I get the calculated position from $88 and do the cursor move
I have recompiled it later with 10 char for left margin and 19 for right one ... giving 51 usable chars. This reminds me the OS-9 GO51!
So, if it were the case, we could put 10 and 38 so that there will be only 32 chars to work with (to replicate the Basic standard screen)
This opens a possibility:
If we had these constants as variables at the beginning, to remember easily where they are, we could poke these places and change the width of the screen on the fly ...
Another possibility would be making all of the code PIC so that it could be relocatable where we need it, for instance in the upper memory from $E000 on.

I would appreciate if someone, that has the Wordpak and a Y-cable / MultiPak could make some test of this, just released, beta driver.
I attach here a zip with the Basic and Binary program in text, cas and wav formats with an VDK image too wich contains the DskDream source for that driver.
Now it's time for some screenshots (photos )
You will see that the very last command in shot 1 is EXEC&H7D04, I always do this, because that way the driver gets uninstalled and the hooks got restored to work normally on the standard screen.

best regards
pere
Attachments
Fourth shot
Fourth shot
04 - A bigger program at GO51 mode.jpg (411.32 KiB) Viewed 5299 times
Third one at 51 chars
Third one at 51 chars
03 - A test with 51 spaces (10 left - 19 right).jpg (294.21 KiB) Viewed 5299 times
Second one
Second one
02 - The same on the standard green screen.jpg (389.77 KiB) Viewed 5299 times
First shot
First shot
01 - A basic program with 76 spaces (1 left - 3 right).jpg (371.85 KiB) Viewed 5299 times
DOS Driver for WordPak80x24.zip
All of the formats
(12.83 KiB) Downloaded 246 times
pser1
Posts: 1655
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: DIY: 80 column WordPak board (CRT9128)

Post by pser1 »

just a short note:
working with the DOS 4.1 from Eurohard is a problem with WordPak because that system prints 14 lines of DIR and the lets the cursor stay at the end of the last printed line.
When you press a key, the DOS sends the rest of the DIR, but the first line of this second bloc is printed next to the last one from prior block, then changes of line.

I have installed the DDOS1.1C in my real Dragon (copying it to high RAM) and once the WordPak starts, the DIR command works perfect with a line for every DIR entry, so I will forget about that problem not related to the driver nor to the WordPak but to Eurohard's DOS4.1

regards
pere
KenH
Posts: 182
Joined: Fri Oct 12, 2012 9:50 am

Re: DIY: 80 column WordPak board (CRT9128)

Post by KenH »

Hi pere,
thanks for sharing this updated driver.
I've done some testing and it works very nicely. The "O K" bug is solved :D
However, the PRINT @ command doesn't seem to work. Text is always printed on the next line. Does PRINT@ work for you on this latest version?
Ken
pser1
Posts: 1655
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: DIY: 80 column WordPak board (CRT9128)

Post by pser1 »

hello Ken,
yes it does!
I will test on my Dragon the version I have uploaded just to verify.
I have a copy on my PC to debug on XRoar with GDB and the other on the Dragon64, I hope I made a copy from Dragon to PC before uploading ...
In fact one of the included shots is made by a program that just uses PRINT@ witn numbers: decimal, octal and hexadecimal
I will tell you after the test.
regards
pere
Post Reply