Jump to content

nippur72's Photo

nippur72

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

Posts I've Made

In Topic: Any info on Video Technology Laser 500 computer?

Mon Feb 18, 2019 5:27 AM

Ahah great! I wasn't even aware there was a "MOTOR" command! Nice finding as well!

Since there is no dedicated "cassette motor" plug, I guess it's not connected. Perhaps it's the REMOTE (70) pin on the VLSI chip (not connected in the 350/500/700 schematics)


In Topic: Any info on Video Technology Laser 500 computer?

Sun Feb 17, 2019 2:05 AM

Leslie, I think you've found something  :) 

not satisfied by yesterday's test, I debugged the unidentified bits in the emulator looking for how and when they were changed.

 

Bit 7 and 4 still remain untouched everywhere; but bit 6 it's the CAPS LOCK state (CAPLK in the schematics).

 

CAPLK is also triggered by CTRL+1 as you've found in your disasselmby. The reason? Laser 350 does not have a dedicated caps lock key, so they made it available via this key combination.

 

Somewhere in the keyboard routine there also should be the code that checks the actual caps lock key and flips the bit.  

 

This is the code I used for debbuging in the emulator, you can try it yourself: open the JavaScript console (F12) and paste this:

(function() {
   let old_io_bit_7, old_caps_lock_bit, old_io_bit_4;
   debugBefore = ()=> {      
      old_io_bit_7      = io_bit_7;
      old_caps_lock_bit = caps_lock_bit;
      old_io_bit_4      = io_bit_4;
   }
   debugAfter = ()=> {                
      let { pc } = cpu.getState();
      if(old_io_bit_7 != io_bit_7)           console.log(`bit 7 changed from ${old_io_bit_7     } to ${io_bit_7     } at ${hex(pc,4)}`);
      if(old_caps_lock_bit != caps_lock_bit) console.log(`bit 6 changed from ${old_caps_lock_bit} to ${caps_lock_bit} at ${hex(pc,4)}`);
      if(old_io_bit_4 != io_bit_4)           console.log(`bit 4 changed from ${old_io_bit_4     } to ${io_bit_4     } at ${hex(pc,4)}`);
   }
})();

In Topic: Any info on Video Technology Laser 500 computer?

Sat Feb 16, 2019 2:33 AM

I tried to flip bit 6 and bit 7 of &H6800 (with bank 1 switched to 2), but nothing happens. I tried that in 40 and 80 columns. Nothing.

I also tried CTRL+SHIFT+key on all keys, but it behaved normally.
 

MON
9000Z
DI
LD A, 02
OUT (41), A
LD A, C0
LD (6800), A
LD A, 01
OUT (41), A
EI
RET

If you have any other test you want me to run, just ask. 
 


In Topic: Any info on Video Technology Laser 500 computer?

Sat Feb 9, 2019 4:56 AM

 

Still working on discovering all the entry points for the BASIC commands and keywords.
 

 

do you already know about "basck" ? it's tool in the Z88DK compiler that automatically scans a ROM dump and finds MS basic entry points:
 

# File size: 32768

# Specific Z80 CPU code detected

# Microsoft 8080/Z80 BASIC found
#  Extended syntax detected (classic version)
#  Double precision maths detected
#  Microsoft signature not found

BASTXT 	= $8041   ; BASIC program start ptr (aka TXTTAB)


#    CPDEHL (compare DE and HL), code found at $5FA1
#    (Detected position for ORG:  0)

INPORT 	= $8579   ; Current port for 'INP' function
OTPORT 	= $857C   ; Current port for 'OUT' statement
SEED 	= $8586   ; Seed for RND numbers
LSTRND2 	= $8580   ; Last RND number
BUFFER 	= $8149   ; Start of input buffer
TMSTPT 	= $839F   ; Temporary string pool pointer
TMPSTR 	= $83BF   ; Temporary string
NXTOPR 	= $83E3   ; Address ptr to next operator
PROGND 	= $83E9   ; BASIC program end ptr (aka VARTAB)
VAREND 	= $83EB   ; End of variables
ARREND 	= $83ED   ; End of arrays (lowest free mem)
SGNRES 	= $852F   ; Sign of result
TEMPST 	= $83A1   ; (word), temporary descriptors
TEMPPT 	= $839F   ; (word), start of free area of temporary descriptor
PRMLEN 	= $840D   ; (word), number of bytes of obj table
NOFUNS 	= $84DE   ; (byte), 0 if no function active
PRMLN2 	= $8475   ; (word), size of parameter block
FUNACT 	= $84E1   ; (word), active functions counter
PRMSTK 	= $840B   ; (word), previous block definition on stack
SUBFLG 	= $83CC   ; (byte), flag for USR fn. array
TEMP 	= $83CE   ; (word) temp. reservation for st.code
VALTYP 	= $838E   ; (word) type indicator
PRITAB 	= $1EAE   ; (word) Arithmetic precedence table
TEMP2 	= $83E3   ; (word) temp. storage used by EVAL
TEMP3 	= $83C4   ; (word) used for garbage collection or by USR function
SAVTXT 	= $83D6   ; (word), prg pointer for resume
TEMPST 	= $83A1   ; (word), temporary descriptors
TEMPPT 	= $839F   ; (word), start of free area of temporary descriptor
CURLIN 	= $803F   ; (word), line number being interpreted
OLDLIN 	= $83E5   ; (word), old line number set up ^C ...
SAVTXT 	= $83D6   ; (word), prg pointer for resume
OLDTXT 	= $83E7   ; (word), prg pointer for CONT


FPREG 	= $852B   ; Floating Point Register (FACCU, FACLOW on Ext. BASIC)
FPEXP 	= $852E   ; Floating Point Exponent
DBL_FPREG 	= $852B   ; Double Precision Floating Point Register (aka FACLOW)
DBL_LAST_FPREG 	= $853A   ; Last byte in Double Precision FP register (+sign bit)

CPDEHL 	= $5FA2   ; compare DE and HL
FNDNUM 	= $3507   ; Load 'A' with the next number in BASIC program
GETINT 	= $350A   ; Get a number to 'A'
DEPINT 	= $34EF   ; Get integer variable to DE, error if negative
FPSINT 	= $34E9   ; Get subscript
POSINT 	= $34EC   ; Get positive integer
GETVAR 	= $59B7   ; Get variable address to DE
DIM 	= $59B2   ; DIM command
CHKSTK 	= $5E9E   ; Check for C levels of stack
OPRND 	= $304E   ; Get next expression value
SYNCHR 	= $5FA8   ; Check syntax, 1 byte follows to be compared
LFRGNM 	= $655B   ; number in program listing and check for ending ')'
HLPASS 	= $3DFA   ; Get back from function passing an INT value HL
MIDNUM 	= $6560   ; Get number in program listing
INT_RESULT_A 	= $3C6F   ; Get back from function, result in A (signed)

GETYPR 	= $320F   ; Test number FAC type (Precision mode, etc..)
TSTSGN 	= $3C35   ; Test sign of FPREG
_TSTSGN 	= $3C76   ; Test sign in number
INVSGN 	= $3C64   ; Invert number sign
STAKFP 	= $3C88   ; Put FP value on stack
NEGAFT 	= $49F9   ; Negate number
LOG 	= $3AC0   ; LOG
EXP 	= $4A63   ; EXP
TAN 	= $4C4C   ; TAN
ATN 	= $4C61   ; ATN
DBL_ABS 	= $3FC6   ; ABS (double precision BASIC variant)
RND 	= $4B14   ; RND
SUBCDE 	= $3999   ; Subtract BCDE from FP reg
FPADD 	= $399C   ; Add BCDE to FP reg
SCALE 	= $3A6B   ; Scale number in BCDE for A exponent (bits)
PLUCDE 	= $3A4B   ; Add number pointed by HL to CDE
COMPL 	= $3A57   ; Convert a negative number to positive
PHLTFP 	= $3C95   ; Number at HL to BCDE
FPBCDE 	= $3C98   ; Move BCDE to FPREG
MLSP10 	= $3C1E   ; Multiply number in FPREG by 10
FPMULT 	= $3B05   ; Multiply BCDE to FP reg
DIV10 	= $3B5D   ; Divide FP by 10
DIV 	= $3B66   ; Divide FP by number on stack
DCBCDE 	= $3E48   ; Decrement FP value in BCDE
BCDEFP 	= $3CA3   ; Load FP reg to BCDE
LOADFP 	= $3CA6   ; Load FP value pointed by HL to BCDE
CMPNUM 	= $3CF1   ; Compare FP reg to BCDE
FPINT 	= $3E24   ; Floating Point to Integer
FLGREL 	= $3C44   ; CY and A to FP, & normalise
INT 	= $3E6E   ; INT
DBL_SUB 	= $3FEC   ; Double precision SUB (formerly SUBCDE)
DBL_ADD 	= $3FF3   ; Double precision ADD (formerly FPADD)
FIX 	= $3E4F   ; Double Precision to Integer conversion
INT_MUL 	= $3F29   ; Integer MULTIPLY
MLDEBC 	= $3EE1   ; Multiply DE by BC
_ASCTFP 	= $42A0   ; ASCII to FP number
H_ASCTFP 	= $429B   ; ASCII to FP number (also '&' prefixes)
PRNUMS 	= $62D2   ; Print number string
PRS 	= $62D3   ; Create string entry and print it
PRS1 	= $62D6   ; Print string at HL
STR 	= $624C   ; STR BASIC function entry
SAVSTR 	= $6255   ; Save string in string area
MKTMST 	= $626F   ; Make temporary string
CRTMST 	= $6272   ; Create temporary string entry
SSTSA 	= $6437   ; Move string on stack to string area
TOSTRA 	= $643F   ; Move string in BC, (len in L) to string area
TSALP 	= $6440   ; TOSTRA loop
FDTLP 	= $2EA7   ; Find next DATA statement
DATA 	= $29EA   ; DATA statement: find next DATA program line..
RESTOR 	= $5FBA   ; 'RESTORE' stmt, init ptr to DATA program line..
NEW_STMT 	= $27B5   ; Interprete next statement
GO_TO 	= $2993   ; Go To..
MAKINT 	= $350D   ; Convert tmp string to int in A register
CONCAT 	= $63FF   ; String concatenation
TESTR 	= $62EB   ; Test if enough room for string
TOPOOL 	= $649E   ; Save in string pool
TSTOPL 	= $62AD   ; Temporary string to pool
EVAL 	= $2ED4   ; (a.k.a. GETNUM, evaluate expression (GETNUM)
EVAL1 	= $2ED7   ; Save precedence and eval until precedence break
EVAL3 	= $2EE9   ; Evaluate expression until precedence break
CRTST 	= $627D   ; Create String
QTSTR 	= $627E   ; Create quote terminated String
DTSTR 	= $6281   ; Create String, termination char in D
GETSTR 	= $6448   ; Get string pointed by FPREG 'Type Error' if it is not
GSTRCU 	= $644B   ; Get string pointed by FPREG
GSTRHL 	= $644E   ; Get string pointed by HL
GSTRDE 	= $644F   ; Get string pointed by DE
TSTSTR 	= $3E1D   ; Test a string, 'Type Error' if it is not

LNUM_RANGE 	= $241A   ; Read numeric range function parameters
LNUM_PARM 	= $2921   ; Read numeric function parameter
_CHRGTB 	= $281A   ; Pick next char from program
_CHRCKB 	= $281B   ; Pick current char (or token) on program
UCASE_HL 	= $3115   ; Get char from (HL) and make upper case
UCASE 	= $3116   ; Make char in 'A' upper case
RINPUT 	= $0C1C   ; Line input
OUTC 	= $57D9   ; Output char in 'A' to console

DATSNR 	= $2222   ; 'SN err' entry for Input STMT
SNERR 	= $2228   ; entry for '?SN ERROR'
ULERR 	= $29CA   ; entry for '?UL ERROR'



# JP table for statements = $1AD1


# TOKEN table position = $1C1D, word list in 'extended BASIC' mode.
#	Token range: 88

# -- STATEMENTS --

#	USING		[229]	- $5CD1
#	TAB(		[220]	- $2C53
#	SPC(		[224]	- same as TAB(
#	= assignment		[240]	
#	+ operand		[242]	- $304E
#	- operand		[243]	- $30F7
#	" string		[34]	- $627E
#	NOT		[225]	- $31FA
#	& specifier		[38]	- $3124
#	ERR		[227]	- $3083
#	ERL		[226]	- $3093
#	VARPTR		[232]	- $30A3
#	USR		[234]	- $12B6
#	INSTR		[222]	- $327C
#	TOKEN_?		[230]	- $6565
#	TOKEN_?		[233]	- $5964
#	TOKEN_?		[228]	- $64A2
#	TOKEN_?		[133]	- $5310
#	TOKEN_?		[223]	- $32F1

#	ELSE		[162]

#	AUTO      	[171]	- $2B15
#	AND      	[247]
#	ABS      	[6]	- $3C57
#	ATN      	[14]	- $4C61
#	ASC      	[21]	- $6484
#	CLOSE      	[195]	- $859A
#	CONT      	[154]	- $602D
#	CLEAR      	[146]	- $60D8
#	CINT      	[28]	- $3D61
#	CSNG      	[29]	- $3DD7
#	CDBL      	[30]	- $3E03
#	CVI      	[43]	- $5099
#	CVS      	[44]	- $509C
#	CVD      	[45]	- $509F
#	COS      	[12]	- $4BA9
#	CHR$      	[22]	- $6494
#	CALL      	[182]	- $5410
#	COMMON      	[184]	- $8585
#	CHAIN      	[185]	- $8588
#	CSAVE      	[155]	- $1593
#	CLOAD      	[156]	- $1714
#	CLS      	[160]	- $0F14
#	COLOR      	[167]	- $0F19
#	CRUN      	[207]	- $1958
#	COPY      	[210]	- $1AC7
#	DELETE      	[170]	- $36FD
#	DATA      	[132]	- $29EA
#	DIM      	[134]	- $59B2
#	DEFSTR      	[173]	- $28D0
#	DEFINT      	[174]	- $28D3
#	DEFSNG      	[175]	- $28D6
#	DEFDBL      	[176]	- $28D9
#	DEF      	[152]	- $32CA
#	DRAW      	[212]	- $12BE
#	ELSE      	[162]	- $29EC
#	END      	[129]	- $5FD8
#	ERASE      	[166]	- $6091
#	ERROR      	[168]	- $2B0A
#	ERL      	[226]
#	ERR      	[227]
#	EXP      	[11]	- $4A66
#	EOF      	[47]	- $85BB
#	EQV      	[250]
#	FOR      	[130]	- $26D3
#	FIELD      	[192]	- $8591
#	FILES      	[198]	- $85A3
#	FN      	[223]
#	FRE      	[15]	- $6682
#	FIX      	[31]	- $3E4F
#	GOTO      	[137]	- $2994
#	GO TO      	[137]	- $2994
#	GOSUB      	[141]	- $297D
#	GET      	[193]	- $8594
#	GR      	[190]	- $10B5
#	HEX$      	[26]	- $6247
#	INPUT      	[133]	- $2D4A
#	IF      	[139]	- $2B47
#	INSTR      	[230]
#	INT      	[5]	- $3E62
#	INP      	[16]	- $3489
#	IMP      	[251]
#	INKEY$      	[233]
#	JOY      	[32]	- $1A7E
#	KILL      	[200]	- $85A9
#	KEY      	[205]	- $0FE2
#	LPRINT      	[158]	- $2B85
#	LLIST      	[159]	- $3519
#	LPOS      	[27]	- $326D
#	LET      	[136]	- $2A11
#	LINE      	[177]	- $2CDE
#	LOAD      	[196]	- $859D
#	LSET      	[201]	- $85AC
#	LIST      	[147]	- $351E
#	LOG      	[10]	- $3AC0
#	LOC      	[48]	- $85BE
#	LEN      	[18]	- $6478
#	LEFT$      	[1]	- $64E4
#	LOF      	[49]	- $85C1
#	MERGE      	[197]	- $85A0
#	MOD      	[252]
#	MKI$      	[50]	- $5080
#	MKS$      	[51]	- $5083
#	MKD$      	[52]	- $5086
#	MID$      	[3]	- $651D
#	MOTOR      	[209]	- $0F57
#	MOVE      	[211]	- $12BB
#	MON      	[214]	- $6B96
#	NEXT      	[131]	- $615C
#	NULL      	[150]	- $6041
#	NAME      	[199]	- $85A6
#	NEW      	[148]	- $5EF9
#	NOT      	[225]
#	OPEN      	[191]	- $858E
#	OUT      	[157]	- $3495
#	ON      	[149]	- $2A77
#	OR      	[248]
#	OCT$      	[25]	- $6242
#	OPTION      	[186]	- $38A8
#	PRINT      	[145]	- $2B8D
#	PUT      	[194]	- $8597
#	POKE      	[153]	- $373F
#	POS      	[17]	- $3272
#	PEEK      	[23]	- $3735
#	POINT      	[234]
#	PAINT      	[213]	- $85B8
#	RETURN      	[142]	- $29CF
#	READ      	[135]	- $2E1A
#	RUN      	[138]	- $2966
#	RESTORE      	[140]	- $5FBA
#	REM      	[143]	- $29EC
#	RESUME      	[169]	- $2AC0
#	RSET      	[202]	- $85AF
#	RIGHT$      	[2]	- $6514
#	RND      	[8]	- $4B14
#	RENUM      	[172]	- $3778
#	RESET      	[204]	- $85B5
#	RANDOMIZE      	[187]	- $38F2
#	RES      	[179]	- $12C1
#	STOP      	[144]	- $5FD4
#	SWAP      	[165]	- $6050
#	SAVE      	[203]	- $85B2
#	SPC(      	[224]
#	STEP      	[221]
#	SGN      	[4]	- $3C6C
#	SQR      	[7]	- $49FE
#	SIN      	[9]	- $4BAF
#	STR$      	[19]	- $624C
#	STRING$      	[228]
#	SPACE$      	[24]	- $64CB
#	SYSTEM      	[189]	- $858B
#	SET      	[178]	- $12C4
#	SOUND      	[206]	- $1198
#	THEN      	[219]
#	TRON      	[163]	- $604A
#	TROFF      	[164]	- $604B
#	TAB(      	[220]
#	TO      	[218]
#	TAN      	[13]	- $4C4C
#	TEXT      	[188]	- $0F8A
#	USING      	[229]
#	USR      	[222]
#	VAL      	[20]	- $653E
#	VARPTR      	[232]
#	VERIFY      	[208]	- $1962
#	WIDTH      	[161]	- $34BC
#	WAIT      	[151]	- $349C
#	WHILE      	[180]	- $5380
#	WEND      	[181]	- $53A1
#	WRITE      	[183]	- $54D3
#	XOR      	[249]
#	Z
#	[+      	[242]
#	[-      	[243]
#	[*      	[244]
#	[/      	[245]
#	[^      	[246]
#	[\      	[253]
#	['      	[231]
#	[>      	[239]
#	[=      	[240]
#	[<      	[241]
#
 

In Topic: Any info on Video Technology Laser 500 computer?

Thu Jan 17, 2019 10:47 AM

I've extended the emulator to work with double sided disks :-) Yes the tracks are reversed on the second side, I guess it makes sense to minimize head movements and also for backward compatibility.

I've also added some debug features for the disk drive so you can see exactly how it works. From the JavaScript console modify the variables:
 

fdc_debug_move = true;   // debugs movements of the drive head
fdc_debug_data_size = true;   // debugs changes in 8/16 bit flag 
fdc_debug_read = true;  // debugs byte reads
fdc_debug_write = true;   // debugs byte writes
fdc_debug_side = true;   // debugs changes in disk side (0/1)

The self-sync bit flag seems to be either 255 (on) or 213 (off) but there are less ONs that OFFs, suggesting that the controller switches automatically to ON somewhere.