Jump to content

nippur72's Photo

nippur72

Member Since 13 Jan 2012
OFFLINE Last Active Feb 23 2019 1:49 AM

#4149123 Any info on Video Technology Laser 500 computer?

Posted by nippur72 on Sat Nov 3, 2018 6:24 AM

We have the real charset ROM dump! Tonino Bisazza extracted it from a Laser 500 he was repairing.

We discovered there are two additional charsets, GERMAN and FRENCH with their relative special letters.

Apparently the choice of the charset is hardwired (see the circuit diagram lines CGA11 and CGA12) but there is also a pin named GT (graphic table?) coming out the video chip that is involved in the selection of the set (I don't understand how though). I wonder whether there is an undocumented feature that is able to switch the charset via software.


45280087_698679710504397_492882028323563

45395541_698689623836739_593798544857917




#4145856 Any info on Video Technology Laser 500 computer?

Posted by nippur72 on Tue Oct 30, 2018 6:29 AM

@Bonstra the manual has the pinout for the Laser 700 builtin interface, see the attached file. BTW, how did you connect the laser to the Apple ][ drive? 

 

And, I hadn't noticed there were different version of the DOS!! What a surprise!

I rechecked the disks and it seems we have three different versions 17/01/86, 01/05/86, 21/05/86:

 

- disk 1: DOS V1.1 good  dated 21.05.86
- disk 2: DOS V1.0 good  dated 01.05.86
- disk 3: DOS V1.1 corrupt dated 21.05.86 (same as disk #1 but corrupt)
- disk 4: DOS V1.0 good dated 17.01.86 (same as disk #7)
- disk 5: NO DOS 
- disk 6: NO DOS (corrupt)
- disk 7: DOS V1.0 good dated 17.01.86 (same as disk #4)
 

I will look forward for you reverse engineering work so I can integrate it in the emulator and possibly build an hardware interface (@Piero Andreini is working on that but we are stuck replicating the controller's Toshiba gate array chip).

 

Btw, have you figured out what is the rotation speed of the disks? Is it the same as Apple? I would like to emulate the physical rotation because at the present moment the sectors are all "packed" at the start of the track without the spacing in between that comes from rotation. 

Attached Thumbnails

  • Immagine.jpg



#4139643 Any info on Video Technology Laser 500 computer?

Posted by nippur72 on Mon Oct 22, 2018 10:39 AM

Disk emulation is working ! (buggy, but working).

 

Many thanks to @Bonstra who did an awesome reverse engineering work (I'm really impressed) and to @deepfb who saved the VT-DOS disks from oblivion. Thanks guys!

 

I was able to boot from a virtual system disk... it's touching for me to see the DOS BASIC 1.0 prompt after so many years :-)

 

Still I can't read the old disks for some reason, but I can format new ones. Saving and loading seem to work nicely as well.

A big help came from the SDISKII project (http://tulip-house.d...K2/english.html), the author published the sources to encode a disk into the Apple II format, so I modified it for the Laser (40 tracks, different interleaving) and converted the .dsk disk images that @deepfb has recovered.

// 0       Write protect sense: 0 = write-protected
// 	                        1 = not write-protected 

@Bonstra: I had to invert the "write protect sense" bit in order to make it work


 

Attached Thumbnails

  • Immagine.jpg



#4137390 Any info on Video Technology Laser 500 computer?

Posted by nippur72 on Fri Oct 19, 2018 12:36 PM

in this video you can clearly see what I was telling some posts ago: text is printed SLOWLY while in graphic mode because they used a set of DRAW commands that were previously manually encoded. This because the charset was not available -- it was not stored in the ROM (as in commodores) but in the video chip directly. So we had this basic subroutine we GOSUBed when we needed to print text in graphic modes. That's just one of the oddities of the Laser computer family.

 

I quote myself... in 2014 I mentioned the infamous DRAW routine used in games to display text.

 

I never imagined I would be able to see it again, but hey! we recovered it, and here it is:

11 GOSUB 40012
180 GR 3:MD=160
182 X=28:Y=110:C=15:A$="COPYRIGHT '86":GOSUB 40040
184 X=32:Y=145:A$="MULTIDIDACT":GOSUB 40040
186 X=32:Y=160:A$="B.V.  VENLO":GOSUB 40040:COLOR 15,0
192 X=0:Y=10:A$=" DEMONSTRATION GAME ":GOSUB 40040:COLOR 2,0
194 A$=INPUT$(1)
195 END
40000 REM INITIALISATIE PROGRAMMA
40012 DIM CAR$(90)
40021 FOR Z=32 TO 90:READ A$
40022 IF A$="STOP"THEN RETURN
40023 READ DA$:CAR$(Z)=DA$:NEXT:RETURN
40040 X1=X:Y1=Y:IF F=0 THEN F=1
40041 FOR M=1 TO LEN(A$)
40042 T$=MID$(A$,M,1)
40050 GH$=CAR$(ASC(T$))
40060 FOR N=1 TO LEN(GH$) STEP 4
40070 IF MID$(GH$,N,1)="/"THEN X=X+(8*F):GOTO 40100
40080 ZZ=VAL(MID$(GH$,N,1)):YY=VAL(MID$(GH$,N+1,1))
40082 JC5=X+ZZ*F:JC6=Y-YY*F
40083 JC7=X+VAL(MID$(GH$,N+2,1))*F:JC8=Y-VAL(MID$(GH$,N+3,1))*F
40084 MOVE (JC5,JC6):DRAW (JC7,JC8):COLOR C,0,0
40090 NEXT N
40100 IF X+8*F>MD THEN X=X1:Y=Y+10*F
40102 NEXT M
40103 RETURN
40140 NEXT N
40190 NEXT M
40200 RETURN
50000 DATA BLANCO,/,UITROEP!,31313337/,QOUTES,25274547/,#
50001 DATA 1353155521274147/,$,124242532444152626563137/
50010 DATA %,17271626125641514252/,&,121321315331155116273536/,'
50011 DATA 3536/,(,131513311537/
50020 DATA ),315353555537/,*,125616523137/,+,32361454/,COMMA
50021 DATA 21323233/
50030 DATA -,1454/,.,31423241/,/,1256/,0,12162141525627471256/
50040 DATA 1,214131372637/,2,115112334444555647271627/,3
50041 DATA 122121415253345617574453/,4,414713531447/
50050 DATA 5,122121415254154515171757/,6,214112151444525315373757/
50051 DATA 7,212223561757/,8,2141244427471213151652535556/
50060 DATA 9,113131535356245415162747/,.,33333535/,;,333232333533/
50061 DATA <,14471441/
50070 DATA =,13531555/,>,21545427/,?,16272747343331313456/,APE,/
50080 DATA A,11155155135315373755/,B,111717471444114152535556/
50081 DATA C,12162747475621414152/,D,1117114152561747/
50090 DATA E,1117115114441757/,F,111714441757/,G,12162757215151535343/
50091 DATA H,111714545157/
50100 DATA I,214131372747/,J,122121415257/,K,111713572451/,L,11171151/
50110 DATA M,11171735353435575751/,N,111751571652/,O,1216274756522141/
50111 DATA P,1117144417475556/
50120 DATA Q,12162747565321313351/,R,11171747565514442451/
50121 DATA S,1221214152532444151627474756/,T,17573137/
50130 DATA U,111721415157/,V,1317535713313153/,W,11175157113333513334/
50131 DATA X,111217165152575612561652/
50140 DATA Y,16175657163434563134/,Z,175712561151/
50150 DATA STOP

It's taken from the demonstration game "CITY INVASION" (soon to be published). Attached is the version you can run on the emulator or dump to WAV.

Attached Files




#4137207 Any info on Video Technology Laser 500 computer?

Posted by nippur72 on Fri Oct 19, 2018 8:48 AM

@deepfb a system disk is a disk where the first 22 sectors contains the boot sector + DOS (which are loaded in RAM at boot). You can get them from disk #4. I also think you need an empty directory which is a sector placed at $02900 (see attached image).

 

Sectors are 256 bytes long and are interleaved when read from VT-DOS:

let sectors = [];
sectors[ 0] =  0;
sectors[ 1] =  3;
sectors[ 2] =  6;
sectors[ 3] =  9;
sectors[ 4] = 12;
sectors[ 5] = 15;
sectors[ 6] =  2;
sectors[ 7] =  5;
sectors[ 8] =  8;
sectors[ 9] = 11;
sectors[10] = 14;
sectors[11] =  1;
sectors[12] =  4;
sectors[13] =  7;
sectors[14] = 10;
sectors[15] = 13;

If we knew the disk interface protocol we could emulate it and attempt a warm boot. And then issue the INIT command.

 

The directory structure is very simple:

NAME, TRACK (byte), SECTOR (byte), STARTADDRESS (word), END ADDRESS (word)

Attached Thumbnails

  • Immagine.jpg



#4133962 Any info on Video Technology Laser 500 computer?

Posted by nippur72 on Mon Oct 15, 2018 9:59 AM

I managed to extract the VT-DOS aka DOS BASIC 1.0 from your disk images. It's only 5.6 Kbytes and it's replicated in almost all disks.

I've also disassembled the boot loader routine, it simply reads the first 22 sectors from the disk and places them in memory in page 6 (the 16K Ram that are not available to Basic).

 

@Bonstra do you need any of these for your work on the disk interface?

I'm also recovering the software from the other disks but many are corrupted. Soon I will post a report of what I managed to recover. 


  • jhd likes this


#4116508 Any info on Video Technology Laser 500 computer?

Posted by nippur72 on Wed Sep 19, 2018 3:34 AM

THE RESET KEY IN LASER 500

 

The reset key is not like any other key in Laser 500, instead of being part of the keyboard matrix, it is directly connected to the CPU reset pin (hence the name "reset").

 

That's why the key is able to bring the user back to the "Ready" prompt in almost any situation. It gets out of any loop the CPU is stucked by simply resetting it.

 

Resetting the Z80 means the CPU clears all its internal registers and begins to execute instructions from location $0000 (in the ROM address space). That's what happens also when you turn on the computer.

 

But yet pressing the "reset" key does not initializes the machine, the BASIC program is not erased, only the prompt is brought back. How is that?

 

The ROM kernel has a trick for knowing whether it's a warm boot or a cold one.

 

When initializing, it checks the 16-bit pointer contained in RAM at $861D, which should contain the "warm reset" routine. If the bytes from this pointer added together plus the constant $E1 matches the content of $861F then it's warm reset, and the CPU continues just from $861D.

 

Otherwise, it's assumed the bytes in the pointer are just uninitialized RAM random values and thus it's a "cold" start. The constant $E1 is added in the sum to avoid zero values of a uninitialized RAM give a false match.

 

Part of the "cold" start involves writing the right values in the $861D pointer and $861F check byte, so that any successive 
reset will be a "warm" one.

 

Normally the pointer is initialized with the value $66C8 which is the actual warm reset routine in the ROM.

 

To see that:

MON
<MON>
861D,861FM
861D: C8 ; $66C8 points to warm reset in ROM
861E: 66 ;
861F: 11 ; calulated as: $66+$C8+$E1=$11 (low byte only)

change any of these, press "reset" and the machine will do a cold start.

 




#4113317 Any info on Video Technology Laser 500 computer?

Posted by nippur72 on Fri Sep 14, 2018 10:04 AM

another little discovery: from a picture of a Laser 770 (link below) it can be seen that such machine has no expansion slot; in its place there are the two disk drive connectors. The missing expansion slot means it cannot load external ROMs implying the DOS ROM must be onboard. 

 

So the ROM labeled "VTL 27-0401-00-00 // 6133-7081 // 8611MAK" in MESS/MAME is wrong, the label is from Laser 700 but the dumped content is from Laser 350/500.

 

https://www.flickr.c...N03/7615777038/




#4111925 Any info on Video Technology Laser 500 computer?

Posted by nippur72 on Wed Sep 12, 2018 3:31 PM

In order to get precise timings for my emulator, I hooked the interrupt vector and used the raster line as a reference. The idea was to change the screen colors, perform delay loops see where the raster is tracing. I did that first on the real hardware and then on the emulator, adjusting the timings accordingly.

 

In the process I've discovered a number of interesting things:

- there are 576 visible scanlines plus 24 hidden, for a total of 625 lines (standard PAL)

- each scanline is repeated twice, thus halving the vertical resolution

- the CPU NMI interrupt is generated at the end of the 576th line, not at 625 as I believed (this is good because that gives extra CPU time for videogames)

- the visible text area (24 character rows) is not centered vertically, it is one row up (5 chars above, 7 chars below).

- the Z80 cpu executes 190 clock cycles per scanline

 

Now here is where my calculations do fail: 190 cycles x (576/2) x 50 Hz = 2736000 = ~ 2.7 Mhz which is much below the 3.6 Mhz of the theoretical CPU speed. Where is the missing Megahertz?

 

And I am pretty sure of the timings because the emulator speed matches precisely the real hardware. Perhaps it's the time spent fetching/decoding the instruction? Or am I missing something else?

In the picture below, I change color to yellow at the start of the NMI interrupt, then wait a bit and change to red/gray. This is how I measured the time elapsed in drawing the screen. On a separate measure I tried to wait to the last scanlines to assess where the frame ends. Since the CPU is locked in the delay, the cursor became very laggy and unresponsive. Waiting too much caused the interrupt routine to skip a beat and show flashing colors.

 

Attached Thumbnails

  • Immagine.jpg



#4111676 Any info on Video Technology Laser 500 computer?

Posted by nippur72 on Wed Sep 12, 2018 9:43 AM

@carlsson, yes the joysticks were the JS20 in the picture, they attached to the expansion slot (not memory expansion). If I remember well it is the same port we attached the printer, the plotter and the light pen. I think it is connected directly to the I/O ports of the Z80. 

@Bonstra ok for the keyboard, thanks, I got it working now... it was the most difficult part. It responds only to 6800-6fff (when mapped in bank 2) not to just any address in the 16K space. I also believe they added the extra lines when they decided to move from 350 to 500. Indeed the 350 is a 500 in a 310 case which does not have "extended" keys. The ROM is able to detect which machine is running depending on the availability of bank 3. If bank 3 is found then Laser 350 is assumed and the "KEY n" basic command is disabled.

The emulator is almost finished, I only have to fix minor details (exact timings etc). It's very handy when doing cross development, it's much more quick and accurate than MAME.
 




#4110818 Any info on Video Technology Laser 500 computer?

Posted by nippur72 on Tue Sep 11, 2018 5:37 AM

I just reverse engineered the joysticks: they are port &h2b (directions+fire1) and &h27 (fire2) in negated logic

 

 

Attached Thumbnails

  • Immagine.jpg



#4108514 Any info on Video Technology Laser 500 computer?

Posted by nippur72 on Sat Sep 8, 2018 1:35 AM

@Bonstra if possible, can you please post any info regarding the keyboard ? I'm having troubles understanding how it works precisely. Intuitively it should be like in Laser200, e.g. keys mapped in I/O space, columns on the data bus (6 bits) and rows in the address bus (11 bits), with negative logic ("0" means key pressed). But I'm unable to read keys from row > 9 for some reason. Perhaps it's the same reason why they don't get them right in MESS emulator too (and hopefully we can fix that).

BTW, talking of emulators, here is my work in progress: https://nippur72.github.io/laser500emu  

 




#4104820 Any info on Video Technology Laser 500 computer?

Posted by nippur72 on Mon Sep 3, 2018 11:43 AM

regarding the contended memory between CPU and VDC, I ran a small experiment: a loop writing "A" into the first screen cell and then alternating screen colour at each iteration (see the attached pic).

 

Since there is no significant difference between background and border, I deduce the impact of memory contending in Laser 500 is minimal or non-existent.

 

The same loop, but writing outside of the video memory didn't change anything.

 

Do you have any theories how they made it?

 

BTW, there is nice wikipedia article on ZX_Spectrum_Contended_Memory: 

 

https://en.wikipedia...ontended_Memory

Attached Thumbnails

  • Senza titolo-1.jpg



#4103463 Any info on Video Technology Laser 500 computer?

Posted by nippur72 on Sat Sep 1, 2018 10:46 AM

I figured out how to read and write from and to I/O.

 

As an example, here is the small program "TAPE MONITOR".

 

https://drive.google...YQ54ZYsYCQC9HLU

 

It reads the cassette bit and changes the screen color accordingly.

 

To run it, go in TEXT 80, enter MON, R, and then start with 9000G

 

What it does:

 

9000,01 switches to bank 2 (I/O) in memory slot 2 (port 41h)

9002 reads the bit 7 of cell 6800h, where the I/O is mapped. Bit 7 is tape.

9009,B writes in port 44h as border color; bit 1 is set to preserve TEXT 80

900D sets as background color by writing to port 45h after adjusting the value 

9017 repeats

 

 

 

 

Attached Thumbnails

  • IMG_20180901_182948.jpg



#4103418 Any info on Video Technology Laser 500 computer?

Posted by nippur72 on Sat Sep 1, 2018 8:44 AM

We should start keeping a library of all L500 software :-)

 

BTW, we are working on adding the Laser 500 as target platform for the z88dk C compiler. Follow the discussion on github: https://github.com/z...88dk/issues/854

 

@CatPix does the manual contains something about the I/O (speaker/cassette/keyboard) ? In case would you please post a pic of the page?