Programming the Sony HBI-V1
This page was last modified 16:16, 21 August 2018 by Mars2000you. Based on work by Manuel and NYYRIKKI.

This is reverse enginered information about usage in Assembler:

#7E00-#7EFF: Read buffer. Will return 256*256 picture. 
After one byte is read, next one will be returned.
(LDIR/OTIR is used to read multiple bytes at a time)
#7FFC R/W: %ABC***XX
A Read: Busy or something like that (Z=Idle, NZ=Busy) Usually you can skip with ESC key.
B Read: Sync something (Wait to be NZ and wait to be back Z)
C Read: Sync something else (Wait to be Z and wait to be back NZ) (Video refresh?)
XX Write: Command
		00 = Terminate
		01 = Digitize
		10 = Digitize with delay
		11 = ??
A Read: Even/Odd frame
D Read: Video signal detected (NZ = No video signal)
XX Write: Start block Y
YY Write: Start block X
XX = Screen mode
	00 = SCREEN 12
	01 = SCREEN 10/11
	10 = SCREEN 8
	11 = Other / Clear memory
YYY = Block size Y
ZZZ = Block size X
#7FFF Write: 8bit data (???)
To reset, write 0 to #7FFF - #7FFC (=backwards)
BIOS Routines:
#4010 "SONY HBI-V1 V10",0
#4020 Digitize
	C	0 = Copy to VDP
	B	0 = Don't loop
	E	Nuber of frames to wait (0 = No wait)
	HL	Pointer to 7 bytes parameter table
	Table pointed by HL:
	n	0-255
	n+1	0-3	Screen mode
	n+2	0-7 	Block size Y ???
	n+3	0-7	Block size X ???
	n+4	0-3	Start block Y ???
	n+5	0-3	Start block X ???
	n+6	0-3	Command
#4023 DCOPY or something like that
	HL	Pointer to parameter table 
	Table pointed by HL:
	Lucky guess: x,y,x,y,x,y
#4026 YJK color adjust (Similar to CALL YJK)
	Color table pointed by HL
#4029 DCLS
	Calls digitize routine (#4020) with following values:
	Table pointed by HL: 0,3,0,0,0,0,1
#402C Start digitize software
	Same as CALL DG in BASIC. Loads the BASIC program from ROM.
#402F Send command to hardware
	HL	Pointer to 7 bytes parameter table
	Table pointed by HL:
	Same as in Digitize routine.
#4032 Copy Digitizer RAM to VRAM.