Datasheet · 1985
Yamaha V9938 MSX-Video — Technical Data Book (August 1985)
Light-pen mode: status S#1 FL/LPS and coordinates in S#3–S#6.
- v9938
- msx2
- vdp
- light pen
Datasheet · 1985
Light-pen mode: status S#1 FL/LPS and coordinates in S#3–S#6.
V9938 MSX-VIDEO Technical Data Book . ASCII CORPORATION/NIPPON GAKKI CO., LTD. V9938 MSX-VIDEO Technical Data Book ASCII CORPORATION/NIPPON GAKKI CO., LTD. @YAMAHA NIPPON GAKKI CO., L TO. © 1985 ASCII CORP./NIPPON GAKKI CO., LTD. PREFACE The V9938 introduced in this manual is a Very Large-Scale Integrated Circuit (VLSI) that was developed as a Video Display Processor (VDP) for the MSX2. The MSX personal computer standard was introduced in 1983 by ASCII Corporation and Microsoft Incorporated. At present, the MSX is manufactured and marketed worldwide. In 1985, out of the desire to strengthen some of the functions of the original MSX, the MSX2 standard was developed. In addition to being software-compatible with the MSX, the MSX2 supports new media and has video processing capabilities that are not available on conventional 8-bit personal computers. To make the MSX2 a reality, two requirements for the Video Processor were upward compatiblity with the existing TMS9918A (the VDP for the MSX) software while increasing the number of functions. The V9938 was developed through the joint efforts of ASCII Corporation, Microsoft Incorporated, and YAMAHA. The following functions are supported on the V9938. - Full bit-mapped mode - 80-column text display - Access using X- and Y-coordinates. The load of the IIO driver has been lightened. The X-Y coordinates are independent of the screen mode. - Fundamental commands implemented by hardware to decrease the processing time of the IIO driver: AREA MOVE, LINE, SEARCH, RASTER OPERATION, etc. - Digitize and external synchronization - Color palette (9 bits x 16 patterns) - Linear RGB video output - More sprites per horizonatal line Because the V9938 has the above functions, it provides for superior video capabilities that make it possible for its use in a variety of applications, including the MSX2. CAPTAIN terminals and NAPLPS terminals using the V9938 have already been developed. We hope that the V9938 will be a standard video processing device on a worldwide basis. This manual was written so as to explain how to set the parameters of the V9938 and is a reference for developing applications and systems software for it. We are pleased that you have chosen to develop software for the and that you have referred to this manual for assistance. V9938 Finally, we would like to express our deep gratitude to the people at NTT as well as the other related manufacturers for their valuable opinions which contributed to the development of the V9938. August, 1985 ASCII Corporation CONTENTS PART 1 MSX-VIDEO DATA PROCESSOR V9938 USER'S MANUAL 1 BAS IC INPUT AND OUTPUT •••••••••••••••••••••• 1. Accessing the Control Registers .•••.•.•......•.... ...... 1 2. Accessing the Pallete Registers ..•....•.........•. ...... 1 3. Accessing the Status Registers •••••••••••••••••••••••••• 2 4. Accessing the Video RAM ••••••••••••••••••••••••••••••••• 2 REG ISTER FUNCTION S. • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •• 4 1. CONTROL REGISTERS #0 to #23 (Wri te only) 2. STATUS REGISTERS #0 to #9 (Read only) ••••••••••••••• 9 4 TEXT 1 MODE •• 11 TEXT 2 MODE •• 15 MULTICOLOR roDE ••• 20 GRAPHIC 1 MODE ••••••••••••••••• 25 GRAPHIC 2 AND GRAPHIC 3 MODES •• 30 GRAPHIC 4 MODE ••• 37 GRAPHIC 5 roDE •••••••••• 41 GRAPH IC 6 MODE ••••••• 46 GRAPH Ie 7 MODE................................................ 50 54 COM.MANDS ••••••••••••••••••••••••••••••••••••••• 1. Types of Commands •••••••••••••••••• 2. Page Concept ........................... ". . . . . . . . . . . . . . .. 55 3. Logical Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 4. Explanations of Commands ••••••••••••••••••••••••••••••• 57 4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.8 4.9 4.10 4.11 4.12 54 ............... 57 HMMC (High- speed move CPU to VRAM) • YMMM (High-speed move V RAM to V RAM, y only) ••••••• HMMM (High- speed move V RAM to VRAM) HMMV (High- speed move VDP to VRAM) •••••••••••••••• LMMC (Logical move CPU to VRAM) ••••••••••••••••••• LMCM (Logical move V RAM to CPU) ••••••••••••••••••• LMMM (Logical move V RAM to V RAM) •••••••••••••••••• LMMV (Logical move VDP to V RAM) ••••••••••••••••••• LINE •••••••••••••••••••••••••••••••••••••••••••••• ............... 60 62 64 66 69 72 74 76 SRCH •••••••••••••••••••••••••••••••••••••••••••••• 78 PSET •••••••••••••••••••••••••••••••••••••••••••••• 81 ro INT •••••••••••••••••••••.•••••••••••...•.•.•.••• 83 5. Speeding up the processing of commands ••••••••••••••••• 84 6. Conditions of registers after command execution •••••••• 85 SPRITES. • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • . • • • • • • • • • • • • • • • • • • • • • •• 86 1. SPRITE mDE 1 (Gl, G2, MC) •••••••••••.••••••••.•••••••. 87 2. SPRITE MODE 2 (G3, G4, G5, G6, G7)..................... 91 3. Setting the Sprite Colors •••••••••••••••••••••••••••••• 98 POINTING DEVICES •••••••••••••••••••••••.••••••••••••••••.••••• 99 1. Light pen •••••••••••••••••••••••••••••••••••.•••••••••• 99 2• Mo us e. • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •• 1 01 SPECIAL FUNCTIONS •••••••••••••••••••••••••••••••••••••••••••• 102 1. Alternate display of two graphics screen pages •••••••• 102 2. Interlace display ••••••••••••••••••••••.•••••••••••••. 103 3. External Synchronization •••••••••••••••••••••••••••••. 104 4. Superimpose •.•••••••••••••••••••.•••••.••••••••••••••• 105 5. Digitize function •••••••••••••••••••••••••••••••••••.• 106 6. Color bus .•••••..•••••.••••••••.•...•••••••••••••••••• 109 PART 2 MSX-VIDEO DATA PROCESSOR LSI DATA SHEET 1. MSX-VIDEO •••••••••••••••••••••••••••••••••••••••••••••••• III 1-1 OVerv iew ••••••••••••••••••••••••••••••••••••••••••••• III 1-2 Features ••••••••••••••••••••••••••••••••••••••••••••• III 1-3 MSX-VIDEO Block diagram •••••••••••••••••••••••••••••• 112 1-4 MSX-VIDEO circuit example •••••••••••••••••••••••••••• 113 2. Pin assignments and functions •••••••••••••••••••••••••••• 114 3. Electrical characteristics and timing chart •••••••••••••• 116 3-1 Absol ute maximum ratings ••••••••••••••••••••••••••••• 116 3-2 Recommended operating conditions ••••••••••••••••••••• 116 3-3 Electrical characteristics under recommended operating conditions •••••••• 117 External input clock timing ••••••••••••••••••••••••••••• *RESET Input timing ••••••••••••••••••••••••••••••••••••• DC characteristics •••••••••••••••••••••••••••••••••••••• Input/output power capacities ••••••••••••••••••••••••••• External output clock timing •••••••••••••••••••••••••••• CPU-MSX-VIDEO Interface •.••••••••••••••••••••••••••••••• MSX-VIDEO- VRAN interf ace. . • • • • • • • • • • • • • • • • • • • • • • • • • • • • •• Composite video signal output level ••••••••••••••••••••• RGB output level •••••••••••••••••••••••••••••••••••••••• Synchronize signal output level ••••••••••••••••••••••••• Composi te video signal ••••••••••••••.••••••••••••••••••• RGB signal •••••••••••••••••••••••••••••••••••••••••••••• Synchroniz e si gnal s. • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •• Color bus ••••••••••••••••••••••••••••••••••••••••••••••• 117 118 118 118 119 121 123 126 127 127 128 128 129 132 VDS ••••••••••••..••••••••.•.•••...••••••.••••••.••••.... 133 4. External measurements of package ••••••••••••••••••••••• 134 5. Version identif ication ••••••••••••••••••••••••••••••••• 134 APPENDIX 1. Refresh .••..•••••••.••••••••• 2. Examples of VRAM Interface •••••••••••••••••••••••••••• 137 3. Clock oscillation internal circui try. 142 4. Usage of unused pins ••••••••.••••••••••.•••••••••••• 143 5. C::i cl e mode •••••••••••••• 144 6. C::i cl e input .......................................... . 145 7. Display parameters •••.•• 146 8. Color palette ••••••••••• 148 9. Compo si te v ideo color bur st. • • • • • • • • • • • • • . • . • • • • • • • • •• 149 10. Color bus ••••••••••.••..•.•••••••••••••. 11. Sprites in G5 mode . . . . . . . • • • . . . . . . . . . . . . . . . . . . . . . . • . . . 151 135 150 PART 1 MSX-VIDEO DATA PROCESSOR V9938 USER'S MANUAL © 1985 ASCII CORP./NIPPON GAKKI CO., LTD. V9938 MSX-VIDEO USER'S MANUAL BASIC INPUT AND OUTPUT 1. Accessing the Control Registers There are two ways to set data in the MSX-VIDEO control registers (R#O to R#46), which we will describe below. 1.1 Direct access Output the data and the register number in sequence to port #1. Since this order is always used, be careful when you access the MSX-VIDEO for an interrupt routine. MSB Port #1 Fi rst byte Second byte 1.2 7 6 S 4 3 2 1 0 LSB ID7 ID6 IDS ID4 ID3 ID2 IDI IDO I DATA 1 0 IRS I R4 I R3 1R2 IRl IRO REGISTER # I Indirect access Specify the register number in control register R#17 (Control Register Pointer> • First set the register number in R#17 (using direct addressing) by sending data to Port #3. When you set the data in RU7, you can also set its MSB (All, the autoincrement bit) to control autoincrementing. The data in R#17 cannot be changed by indirect addressing. If autoincrementing is prohibited, the contents unchanged, and thus you do not have to reset R#17. MSB 7 6 S 3 2 1 R#17 o will be LSB Register #17 REGISTER # Port #3 First byte DATA Port #3 Second byte DATA I I DATA Port #3 nth byte 2. 4 of Accessing the Pallete Registers To set data in the MSX-VIDEO palette registers (p#O to P#lS/9 bit), you must first set the palette register number in register R#16 (Color palette address pointer) and subsequently output the two bytes of data (in order) through port #2. 1 V9938 MSX-VIOEO USER'S MANUAL MSB 7 6 5 4 3 2 1 0 LSB I 0 I 0 I 0 le3 le2 leI leo I Pallete # Port #2 Fi rst byte 0 IR2 IRl IRO OATA 0 IB2 IBI IBO i I i i I i Red data Blue data OATA Port #2 Second byte I 0 0 0 0 0 IG2 IGI IGO Regi ster U6 0 I I ~--~--~--~--~--~~i===Ci===ri~ Green data 3. Accessing the Status Registers To read the status registers of the MSX-VIOEO (S#O to S#9), you must first set the register number in R#15 (Status register pointer) apd read the data through Port U. MSB 4. 7 6 5 4 2 3 1 o LSB Register US I 0 I 0 I 0 I 0 IS3 IS2 ISl ISO I Status register # Port #1 Read data 107 106 105 104 103 /02 101 100 I OATA Accessing the Video RAM A Video RAM of 128K bytes plus an expansion RAM of 64K bytes can be connected to the MSX-VIOEO. The memory maps for these cases are shown in the map below. Address counter IFFFFH OFFFFH D OOOOOH Video RAM (For display) Expansion RAM (For data I/O registers) Accessing memory To access memory, follow the procedure below. 1. 2. 3. 4. 5. SWitch banks (VRAM to Expansion RAM) Set the address counter (A16 to Al4) Set the address counter (A7 to AO) Set the address counter (A13 to A8), and specify read or write Read or write the data 2 V9938 MSX-VIDEO USER'S MANUAL 1. Switching banks (VRAM to Expansion RAM) Since the contents of R#45 (Argument register) do not change each time that memory is accessed, it is not necessary to respecify bit 6 of register R#45 (which specifies banking) every time that you are to do banking. MSB 7 6 5 4 3 2 1 o LSB Argument register Regi ster #45 2. Setting the.address counter (A16-Al4) Set the high-order three bits (A16 to Al4) of the address using register R#14 (VRAM Access base address register). MSB Register 4114 3. 7 6 5 4 3 o o o o o IAl61A151Al41 VRAM Access, base address reg1ster 2 1 LSB ~__~__~__~__~__~__~__-L__~ Setting the address counter (A7 to AO) Set the low-order eight bits (A7 to AO) outputting data to Port U. MSB Port 411 4. o 7 6 5 4 3 of the 2 1 address 0 IA7 IA6 IA5 IA4 1A3 111.2 IAl lAO counter by LSB First byte Setting the address counter (A13 to A8) and specifying read or write Set the remaining six bits (A13 to A8) of the address specify read or write by outputting data to Port #1. MSB Port 411 7 6 X X IA131A121 AII IAloIA9 lAS i 0 0 5. counter 5 4 3 2 1 0 counter and LSB Second byte i 0: 1: Read write Reading or writing data Since the address counter is automatically incremented when data is read from or written to Port #0, you may continually access blocks of data. * * To access the VRAl-l, you can also use commands. be explained in a later chapter. Refer to the data sheet for access timings. 3 These commands will V9938 MSX-VIDEO USER'S MANUAL REGISTER FUNCTIONS 1- CONTROL REGISTERS 1.1 Mode Registers MSB 7 #0 to #23 (Write only) #32 to #46 (Write only) 6 5 4 3 2 1 0 LSB 1M3 0 Mode Register 0 R#O 0 IDG IE2 lEI M5 M4 R#l 0 IBL lEO Ml M2 0 lSI R#8 MS ILP TP CB VR 0 ISPDIBW Mode Register 2 R#9 LN 0 Sl SO I * Indicates negative logJ.c. IL EO I*NTloc Mode Register 3 R#O DG: IE2: lEI: M5 M4 M3 R#l BL lEO: Ml M2 SI MA R#8 MS LP TP CB VR SPD: BW: R#9 LN Sl SO IMAG Mode Register 1 Sets the color bus to input mode, and inputs data into the VRAM. Enables interrupt from Lightpen by Interrupt Enable 2. Enables interrupt from Horizontal scanning line by Interrupt Enable 1. Used to change the display mode. Used to change the display mode. Used to change the display mode. When 1, screen display enabled. When 0, screen disabled. Enables interrupt from Horizontal scanning line by Interrupt Enable O. Used to change the display mode. Used to change the display mode. When 1, sprite size is 16 x 16. When 0, 8 x 8. Sprite expansion; when 1: expanded. When 0, normal. When 1, sets the color bus to input mode and enables mouse. When 0, sets the color bus to output mode and disables mouse. When 1, enables light pen. When 0, disables light pen. Sets the color of code 0 to the color of the palette. When 1, sets the color bus to input mode. When 0, sets the color bus to output mode. Selects the type of Video RAM. 1 = 64K x 1 bit or 64K x 4 bits. o = 16K x 1 bit or 16K x 4 bits. When 1, disables display of sprite. When 0, displays spri teo When 1, sets black and white in 32 tones. When 0, sets color (available only with a composite encoder) • When 1, sets the horizontal dot count to 212. When 0, sets the horizontal dot count to 192. Selects simul taneous mode. Selects simultaneous mode. 4 V993S MSX-VIDEO USER'S MANUAL IL When 1, interlace (Complete NTSC timing) When 0, non-interlace (Incomplete NTSC timing) When 1, displays two graphic screens interchangably by Even field/Odd field. When 0, displays the same graphic screen by Even field/Odd field. When 1, PAL <313 lines): when 0, NTSC (262 lines). (For RGB output only) When 1, sets *DLCLK to input mode: when 0, sets *DLCLK to output mode. EO *NT DC 1.2 Table Base Address Registers The table base address registers are a set of registers to declare the addresses of tables in the VRAM to be used by MSX-VIDEO. Note that when these registers are accessed, the control codes that the screen may receive depends on the display mode. For this purpose, you must mask the unwanted bits. MSB 7654321 a LSB a IA161A1SIA141A131A121AIIIAIoI Pattern name table base R#2 address register R#3 IAl3lAl21AlliAlOlA9 lAS IA71A6 RUO a a 10 1 0 10 IAl61AlsIAl41 Color table base address R#4 a a IAl61AlsIAl41Al31Al21Alli Pattern generator table R#S 1.3 table base address I Color register low register high base address register IAl41Al31Al21 AlI I AlO IA91AsIA71 Sprite attribute table base address register low attribute table I a I a IAl61AlsI Sprite base address register high R#ll a a I a I a R#6 a a IAl61AlsIAl41Al31Al21Alli Sprite pattern generator table base address register Color Registers The color registers are used to control the MSX-VIDEO's background screen colors as well as blinking, etc. MSB R#7 7 6 5 4 3 2 1 a ITC 3 1TC21 TCII TCol BD3 1BD21BD11 BDO TC3 to TCO: BD3 to BDO: text and LSB color/Back drop I Text color register Specifies the text color according to TEXT 1 and TEXT 2 modes. Specifies the back drop color in all display modes. 5 V9938 MSX-VIDEO USER'S MANUAL MSB R#12 7 6 4 5 3 1 2 o LSB IT23lT22lT21lT20lBc3lBC21BCIIBCoI Text color/Back color register In TEXT 2 mode, if the attributes for blinking are set, the color in this register and set in R#7 are displayed alternately. Specif ies the color of part 1 of the pattern. Specif ies the color of part 0 of the pattern. T23 to T20 : BC3 to BCO: MSB RU3 7 6 5 set 4 3 1 2 0 LSB ION310N210NIIONOIOF31OF21OFIIOFOI Blinking period register In the bit map modes of GRAPH4 to GRAPH7, the two pages are alternately displayed (bl inked) . Place data in this register to set the display page to an odd page to begin blinking. This register is also used in the TEXT2 mode. ON3 to ONO: OF3 to OFO: Display time for even page Display time for odd page 7 6 5 4 3 2 1 0 LSB R#2O 0 0 0 0 0 0 0 0 Color burst register 1 R#21 0 0 1 1 1 0 1 1 Color burst register 2 R#22 0 0 0 0 0 1 0 1 Color burst register 3 MSB The above values are preset when the power is applied. If all values in the above three registers are set to 0, the color burst signal of the composite video output will be erased. If the above values are subsequently reset to the preset normal color burst signal will be output. values, the The display registers are used to control the display position on CRT. the 1.4 Display Registers MSB RU8 7 6 4 5 IV3 1V2 IVI Iva 3 1 2 o LSB 1H3 IH2 IHI IHO I Display adjust register The above register is used to adjust the display position on the CRT. H= 7 ( Left) ...H . .V V = 8 (Bottom) 1, H = 0, H = 15 (Center) 15, V = 0, V (Center) 1 . . H= 8 (Right) . V=7 (TOp) 6 V9938 MSX-VIDEO USER'S MANUAL MSB R#23 7 6 5 4 3 2 1 0 LSB ID07ID06ID05ID04ID03/D02IDOIIDOol Display offset register The above register sets the location of the line to begin display. VRAM (Line) TOP 0 CRT Screen BOTTOM 192 or 212 R#23 0 R#23 200 255 0 CRT Screen BOTTOM 136 or 156 TOP 200 CRT Screen 255 MSB R#19 7 6 5 4 3 2 1 0 LSB IIL71IL61IL51IL41IL31IL21ILIIILOI Interrupt line register You may specify interrupts when the MSX-VIDEO begins to display a specified scanning line. To enable the interrupt, use the above register to set the scanning line. 1.5 ACCESS REGISTERS The access registers are a set of registers used MSX-VIDEO registers or the VRAM. MSB R#l4 o 7 6 5 4 3 o o o o o IAl61A151Al41 ~ 1 2 __~__~__~__~__~__- L__~__~ when accessing the LSB VRA~ Access base address reg~ster When accessing the MSX-VIDEO and the Video RAM (VRAM), set the highorder three bits of the address in the VRAH access base address register. When data is set in this register, and the VRAM is accessed, if there is a carry from Al3, the data in the register is automatically incremented. In GRAPHICl, GRAPHIC2, MULTICOLOR, and TEXTI modes, the data in the register is not automatically incremented. R#15 I 0 I 0 I 0 I 0 IS3 IS2 lSI Iso I Status register pointer When reading the MSX-VIDEO status registers contents of the Status register pointer. 7 (S#O to S#9), set the V9938 MSX-VIDEO USER'S MANUAL MSB RU6 a 7 6 5 4 a a a a IC3 IC2 ICI Ico 3 I 2 LSB I Col~r palette address regl.ster When setting the color palette of the MSX-VIDEO, set the number of the palette in the Color palette address register. MSB RU7 7 6 5 4 3 2 a LSB I IAIllo IRSsIRS41RS31RS21RSIIRSoI Control register pointer In the MSX-VIDEO, the above control register pointer may be used to access another register. In addition, according to the setting of the All bit, the data can be automatically incremented. All 1: All = 0: 1.6 Auto increment disabled Auto increment enabled COMMAND REGISTERS The following command registers are used when executing a command on the MSX-VIDEO. Details on the use of these command registers will be presented in a later chapter. MSB 7 6 5 4 3 2 a 1 LSB R#32 SX7 SX6 SXS SX4 SX3 SX2 SXl sxOI Source X low register R#33 a R#34 SY7 SY6 SYS SY4 SY3 SY2 SYl R#3S a R#36 DX7 DX6 DXS DX4 DX3 DX2 DXl DXOI Destination X low register R#37 o a DX81 Destination X high register R#38 DY7 DY6 DYS DY4 DY3 DY2 DYl Destination Y low register R#39 a R#40 NX71NX6 NxsINX4 NX3 NX2 NXl NXO R#41 a I 0 NX8 Number of dots X high register R#42 NY7\NY6 NYSINY4 NY3 NY2 NYl NYO Number of dots Y low register R#43 o I a a a a a a a a a a a a a o Ia a Ia a a o a a a a a SX81 Source X high register Source Y low register a SY9 Sysl Source Y high register a a DY9 a a a Destination Y high register NY9 NY8 Number of dots X low register Number of dots Y high register R#44 ICH31cH21CHlicHOlcL31cL21CLliCLOI Color register R#4S I a IMXclMXDIMXSIDIylDIXIEQ IMAJI Argument register R#46 ICM31CM21cMlicMOIL031L021LOlILOoI Command register 8 V9938 MSX-VIDEO USER'S MANUAL 2. STATUS REGISTERS #0 to #9 (Read only) The following status registers are read-only registers the status when the MSX-VIDEO is read. MSB 7 6 5 4 3 2 1 0 for reporting LSB F Iss C IFif~h S~ri t~ n~ber I Status register 0 I Vertical scanning interrupt flag When S#O is read, this flag is reset. S#O F: 5S: Flag for the fifth sprite Five sprites are aligned on the first horizontal line (In the G3 to G7 modes, 9 sprites are allowed) C: Collision flag Two sprites have collided. Fifth sprite number: The number of the fifth (or ninth) sprite. MSB S#l 7 6 IFL ILPsl FL: 5 4 3 1 2 Id~nti~ica~ion:# o IFH LSB Status register 1 Lightpen flag (Lightpen flag set) If the lightpen is to detect light, this bit as well as the IE2 bit must be both set in order for an interrupt to be enabled. When S#l is read, FL is reset. Mouse switch 2 (Mouse flag set) The second switch on the mouse was pressed. In this case, when S#l is read, FL is not reset. LPS: Lightpen switch (Lightpen flag set) The lightpen switch was pressed. In this case, when S#l is read, LPS is not reset. Mouse switch 1 (Mouse flag set) The first switch on the mouse was pressed. In this case, when S#l is read, LPS is not reset. Identification number: The identification number (ID #) of the MSX-VIDEO. FH: MSB S#2 TR: Horizontal scanning interrupt flag Horizontal scanning interrupt (which is specified in R#19) flag. If lEI is set, an interrupt is enabled. When S#l is read, FH is reset. 7 6 5 4 3 1 2 o LSB ~IT_R~I_V_R~I_H_R~IB_D~I~l~__l~IE_O__I~C_E~I Status register 2 Transfer ready flag When the CPU sends commands to the VRAM and other devices, the CPU checks this flag while transferring data. When this flag is set to l, transfer may be done. 9 V9938 M8X-VIDEO U8ER'8 MANUAL VR: Vertical scanning line timing flag During vertical scanning, this flag is set to 1. HR: Horizontal scanning line timing flag During horizontal scanning, this flag is set to 1. BD: Boundary color detect flag When the search command is executed, this flag detects whether the boundary color was detected or not. EO: Display field flag When 0, indicates the first field. When 1, indicates the second field. CE: Command execution flag Indicates that a command is being executed. M8B 7 6 S 4 3 2 1 8#3 X7 IX6 Ixs IX4 X3 X2 Xl Ixo Col umn register low 8#4 1 I 1 I 1 I I I 1 I IX8 Col umn register high 8#5 Y7 IY6 lyS IY4 Y3 Y2 Yl lyO Row register low 8#6 1 0 LSB 1 I 1 1 1 EO Iys Row register high I I I The above registers are set to indicate the collision location of spri tes, the location of lightpen detection, and the relative movement of the mouse. 8#7 IC7 IC6 Ics I C4 I C3 IC2 ICl Ico I Color register The above color register is used when the POINT and VRAH to commands are executed. The VRMI data is set in this register. 8#8 IBX71BX61BxslBX41BX31BX21BXIIBxoi Border X register low 8#9 I 1 I 1 I 1 I 1 I 1 I I CPU I I IBX8 1 Border X register high When the search command is executed and the border color detected, the X coordinate is set in the above registers. 10 has been V9938 MSX-VIDEO USER'S MANUAL TEXT 1 NODE Character istics - 6 dots (w) x 8 dots (h) 256 types 40 (w) x 24 (h) patterns Two colors out of 512 colors (per screen) 4K bytes Pattern size Patterns Screen pattern count Pattern colors VRAJI'I area per screen Controls - Pattern font Screen pattern location Pattern color code 1 Pattern color code 0 Background color code VRAJI'l pattern generator table VRAN pattern name table High-order four bits of R#7 Low-order four bits of R#7 Low-order four bits of R#7 Ini tial Settings 1. Mode and Register Settings NSB 5 4 1 7 6 R#O 0 DG IIE2 lEI 1 0* 0*1 0* I 0 R#l 0 BL IIEO 1*1 0* 0 lSI R#8 ~1S LP ITP CB 0 I SPD IBW Mode register 2 R#9 LN 0 lSI ~*NT IDC Mode register 3 3 IVR SO IlL 2 EO 0 Mode register 0 IMAG Mode register 1 * Examples of sett1ngs in TEXT 1 mode ** Indicates negative logic All other bits are set accordingly 11 LSB V9938 MSX-VIDEO USER'S MANUAL 2. Pattern Generator Table Settings - The pattern generator table is an area that stores the pattern fonts. - Each pattern has a number from PNO to PN255. - The font for each pattern is constructed from 8 bytes, and the lower two bits of each of the eight bytes is not displayed. - Set the beginning (head) address of the pattern generator table in register R#4. MSB RH o 7 6 o o IAl61A151Al41Al31Al21Alli Pattern generato: table 5 4 3 1 2 LSB base address reglster Pattern generator table (X=l, 0=0) II MSB 76543210 LSB o OOXOOOOO 1 OXOXOOOO 2 XOOOXOOO 3 XOOOXOOO 4 XXXXXOOO 5 XOOOXOOO 6 XOOOXOOO 7 00000000 ----~ 8 XXXXOOOO ----~ 9 XOOOXOOO 10 XOOOXOOO 11 XXXXOOOO 12 XOOOXOOO 13 XOOOXOOO 14 XXXXOOOO 15 00000000 ----~ 2040 2041 2042 2043 2044 2045 2046 2047 XOXOXOOO ----~ OXOXOXOO XOXOXOOO OXOXOXOO XOXOXOOO OXOXOXOO XOXOXOOO OXOXOXOO These bits are not displayed. Pattern number 0 Pattern number 1 Pattern number 255 12 V9938 MSX-VIDEO USER'S MANUAL 3. Pattern name table settings - The pattern name table is composed of one byte for each screen pattern. Each byte specifies a unique pattern. Set the beginning (head) address of the pattern name table in register R#2. MSB 7 5 6 4 3 o 1 2 LSB R#2 Pattern name table base address register Pattern name table Base address o o ( 0, 0) ( 1, 0) 1 o 0 1 2 3 ( 2, 0) 2 1 40 41 42 43 (39, 0) 22 880 881 39 ( 0, 1) 23 920 921 40 y 1 39 3 2 'H • ·m . Screen display correspondence ~ 959 13 79 959 X V9938 MSX-VIDEO USER'S MANUAL 4. Color register settings MSB 7 6 R#7 5 4 o LSB 1 2 3 Text color/Back drop color register ~--~--~--~ Specifies pattern color code 0 or back drop coler Specifies pattern color code 1 Example of VRMI allocation in TEXT 1 mode OOOOOH Pattern Name Table 0 f>1SB 7 6 5 4 3 2 1 0 R#2 0 0 0 0 0 0 0 a LSB A16 A1S Al4 Al3 Al2 All AlO 003COH 00800H Pattern Generator Table 0 f..1SB 7 6 5 4 3 2 1 0 R#4 0 0 0 0 0 0 0 1 LSB A16 A15 Al4 Al3 Al2 All OlOOOH Pattern Name Table 1 MSB 7 6 5 4 3 2 1 0 R#2 0 0 0 0 0 1 0 0 LSB A16 AIS Al4 Al3 Al2 All Ala 013COH 01800H Pattern Generator Table 1 MSB 7 6 5 4 3 2 1 o R#4 a a o o o o 1 1 LSB A16 A1S Al4 Al3 Al2 All 02000H A maximum of 32 pages may be allocated in the same manner (using a 128K-byte VRAM). IFFFFH 14 V9938 MSX-VIDEO USER'S MANUAL TEXT 2 MODE Characteristics 6 dots (w) x 8 dots (h) 256 types 80 (w) x 24 (h) patterns 80 (w) x 26.5 (h) patterns Possible for each character Two colors out of 512 colors (per screen), four if using blinking 8K bytes - Pattern size - Patterns - Screen pattern count - Pattern blinking - Pattern colors - VRAr.1 area per screen Controls - Pattern font Screen pattern location Blink attributes Pattern color code 1 Pattern color code a Background color code Pattern color code 1 VRAM pattern generator table VRAM pattern name table VRAM color table High-order four bits of R#7 Low-order four bits .of R#7 Low-order four bits of R#7 High-order four bits of R#12 (Used for blinking) Low-order four bits of R#12 (Used for blinking) - Pattern color code a Initial Settings l. Mode and Register Settings l-1SB 7 6 4 5 3 1 2 a LSB R:fl:O a IDG IE2 IEll 0* 1*1 0*1 a Mode register a R:fl:l a IBL lEO 1*1 0* 0 lSI IMAG Mode register 1 R:fl:8 Ir.1S ILP TP CB a ~PD IBW 110de register 2 IVR Hode register 3 ILN I 0 Sl SO IlL EO ~*NTIDC * Examples of settings in TEXT 2 mode ** Indicates negative logic In this display mode, if LN is set to 1, 26.5 lines are selected, and if LN is set to 0, 24 lines are selected. All other bits are set accordingly R:fl:9 2. Pattern Generator Table Settings - The pattern generator table is an area that stores the pattern fonts. - Each pattern has a number from PNO to PN255. - Set the beginning (head) address of the pattern generator table in register R#4. MSB R#4 7 6 5 4 3 1 2 a a LSB Pattern generator table base address register 15 V9938 MSX-VIDEO USER'S MANUAL - The font for each pattern is constructed from 8 bytes, and the lower two bits of each of the eight bytes is not displayed. Pattern generator table (X=l, 0=0) These bits are not displayed. " r.ISB 76543210 LSB o OOXOOOOO 1 OXOXOOOO 2 XOOOXOOO 3 XOOOXOOO 4 XXXXXOOO 5 XOOOXOOO 6 XOOOXOOO Pattern number 0 7 00000000 3. 8 XXXXOOOO 9 XOOOXOOO 10 XOOOXOOO 11 XXXXOOOO 12 XOOOXOOO 13 XOOOXOOO 14 XXXXOOOO 15 00000000 Pattern number 1 2040 XOXOXOOO 2041 OXOXOXOO 2042 XOXOXOOO 2043 OXOXOXOO 2044 XOXOXOOO 2045 OXOXOXOO 2046 XOXOXOOO 2047 OXOXOXOO Pattern number 255 Pattern name table settings - The pattern name table is composed of one byte for each screen pattern. Each byte specifies a unique pattern. - If LN is set to 0, the screen display pattern is 80 (w) x 24 (h); and if LN is set to 1, the screen display pattern is 80 (w) x 26.5 (h). The upper half of the 27th pattern (h) is displayed. - Set the beginning (head) address of the pattern name table in register R#2. MSB 7 6 5 4 3 1 2 R#2 16 o LSB 1 Pattern name table base address register V9938 MSX-VIDEO USER'S MANUAL Pattern name table Base address o ( 0, 0) o ( 1, 0) 1 o 0 1 2 3 .r?!] ( 2, 0) 2 1 80 81 82 83 .~ (79, 0) 79 ( 0, 1) 80 1 25 2000 2001 26 2080 2081 79 3 2 X ·M ·E y Screen display correspondence (79,26) 2159 Color table settings 4. - In TEXT 2 mode, each pattern has a separate bit for the attribute area, and if this bit is set to 1, the pattern blink attribute will be set. - Set the beginning (head) address of the color table in registers R#3 and RHO. 3 2 1 o IAl31Al21AlliAlOIA9 1 1 1 7 MSB R#3 6 5 4 LSB I Color table ~~==~~~~~~~~~ ~1_0__1~0__1~0~1~0~1~0~I~Al__6~I_A_l_5~I~Al__4~1 base address registers RHO COLOR TABLE MSB 7 6 5 4 3 2 1 o o ( 0, 0) ( 1, 0) ( 2, 0) ( 3, 0) ( 4, 0) ( 5, 0) ( 6, 0) ( 7, 0) 1 ( 8, 0) ( 9, 0) (10, 0) (ll , 0) (12, 0) (13, 0) (14, 0) (15, 0) 17 LSB Base address V9938 MSX-VIDEO USER'S MANUAL 5. Color register settings - Set the color for pattern 1 in the high-order bits of register R#7. - Set the color for pattern 0 in the low-order bits of register R#7. MSB 7 5 6 o 1 2 3 4 LSB R#7 Text color/Back drop color register - Set the blink attribute for the corresponding pattern by setting an alternate color code in register R#12. The pattern will be blinked by using the color codes set in registers R#7 and R#12. MSB 6 5 4 3 2 1 0 LSB 'T231T22 'T21 1T20 IBC3' BC2' Bel' BCO I Text color/Back color register R#12 6. 7 Blink register settings - The color codes set in registers R#7 and R#12 will be alternately displayed for b1inking~ however, the blinking period attribute (time on and time off) can also be set in register R#13. R #7 R #12 On time ~I~ Off time ~I I~ MSB R#13 7 6 R #12 5 4 3 2 1 0 LSB ION310N210N110NOIOF31oF21oF110FOI Blinking period register I I I ON time I OFF time - The data for the ON and OFF times are shown below. (NTSC) DATA (Binary) TIME (ms) 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1 0 0 0 1 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 0 166.9 333.8 500.6 667.5 834.4 1001.3 1168.2 1335.1 1501.9 1668.8 1835.7 2002.6 2169.5 2336.3 2503.2 18 V9938 MSX-VIDEO USER'S MANUAL Example of VRAM allocation in TEXT 2 mode Pattern name table base address OOOOOH Pattern Name Table 0 HSB 7 6 5 4 3 2 1 0 R#2 0 0 0 0 0 0 1 1 00870H OOAOOH Al6 AlS Al4 Al3 Al2 Color Table 0 - OOBOEH OlOOOH Pattern Grnerator Table 0 Color table base address MSB 7 6 5 4 3 2 1 0 R#3 0 0 1 0 1 1 1 1 0 0 0 LSB Al3 Al2 All AlO A9 01800H R#lO 0 0 0 0 0 02000H Al6 AlS Al4 Pattern Name Table 1 02870H 02AOOH LSB -Color Table 1 Pattern generator table base address - 02BOEH 03000H MSB 7 6 5 4 3 2 1 0 R#4 0 0 0 0 0 0 1 0 Pattern Generator Tabl e 0 LSB A16 Al 5 Al 4 Al3 Al2 All 03800H 04000H A maximum of 16 pages may be allocated in the same manner (using a 128K-byte VRA}l). IFFFFH 19 V9938 MSX-VIDEO USER'S MANUAL MULTlCOLOR MODE Characteristics - 64 (w) x 48 (h) color blocks Sixteen colors out of 512 colors Spri te mode 1 4K bytes Screen composition Color blocks Spr i te mode VRAM area per screen Controls - Color block color code Color block location Background color code Sprites VRAN pattern generator table VRAM pattern name table Low-order four bits of R#7 VRAl'1 sprite attribute table VRAM sprite pattern table Initial Settings l. Mode and Register Settings MSB 7 6 5 4 2 3 1 0 R#O 0 IDG IE21 IEll 0* 0*1 0*1 0 R#l 0 IBL IEol 0*1 1* 0 lSI R#8 IHS ILP TP ICB IVR 0 I SPD IBW LSB Mode register 0 IMAG Mode register 1 Mode register 2 Mode register 3 ILN I 0 Sl Iso IlL EO ~*NTIDC * Examples of settings the di spl ay mode to the MULTI COLOR mode ** Indicates negative logic R#9 2. Pattern Generator Table Settings - The pattern generator table is an area that stores the colors of the color blocks. - Each pattern is made up of four color blocks. These patterns are approximately 8 x 8 when the dots available for the screen display area is 256 x 192 dots. ~ A 8 dots --- B I I 8 dots C D 20 For each block A, B, C, and D, sixteen colors may be specif ied. V9938 MSX-VIDEO USER'S MANUAL - In the MULTICOLOR mode, two bytes are used each pattern includes four color blocks. MSB 5 6 7 3 4 2 1 for 0 each pattern, and LSB C~lor :COd~ B C~lor :COd~ D C~lor : COd~ A C~lor : COd~ C - In the MULTICOLOR mode, for each pattern name, there are four corresponding color blocks, and according to the y-coordinate, the pattern names are automatically set. MSB r tHE tHE Pattern name liN [2lD ~ ~ ~ 7 6 5 4 3 2 o 1 Color code A Color code B Color code C Color code D Color code E Color code Color code G Color code H Color code I Color code J Color code K Color code L Color code M Color code N Color code 0 Color code P F LSB Pattern when Y=O, 4, 8, 12, 16, or 20 is selected Pattern when Y=l, 5, 9, 13, 17, or 21 is selected Pattern when Y=2, 6, 10, 14, 18, or 22 is selected Pattern when Y=3, 7, 11, 15, 19, or 23 is selected Set the beginning (head) address of the pattern generator register RH. MSB R#4 7 6 5 4 3 210 o table LSB Pattern generator table base address register Pattern generator table o Pattern name #0 (Eight bytes) 8 Pattern name #1 (Eight bytes) 16 2040 Pattern name #255 (Eight bytes) 2048 21 Base address in V9938 MSX-VIDEO USER'S MANUAL 3. Pattern name table settings - The pattern name table is composed of one byte for pattern. Each byte specifies a unique pattern number. each screen Pattern name table o 2 1 31 3 o 0 1 2 3 1 32 33 34 35 22 704 705 23 736 737 X °H • 63 o§ • 767 y - Set the beginning (head) register R#2. MSB R#2 7 6 5 address of the 3 1 0 4 2 0 IAl6IA15IAl4IAl3IAl2I All IAl 0 Pattern name table Base address o ( 0, 0) ( 1, 0) 1 ( 2, 0) 2 (31, 0) 31 ( 0, 1) 32 (31,23) 767 22 pattern name table LSB name table I Pattern base address register in V9938 MSX-VIDEO USER'S MANUAL 4. Color register settings LSB R#7 Text color/Back drop color register Specifies backdrop color Ignored 5. Sprite settings - Set the beginning (head) address of the sprite attribute table in registers R#5 and R#ll; and set the beginning (head) address of the sprite pattern generator table in register R#6. For details about sprites, see the section on SPRITE MODE 1. MSB 7 6 5 4 3 1 2 o LSB R#ll IAl41Al31Al21AlliAlO IA9 IA8 IA7 I Sprite attribute table I 0 I 0 I 0 I 0 I 0 I 0 IAl61A15 I base address register R#6 I I R#5 0 0 pattern generator 1Al61 A151 Al 41 Al31 Al21 All I Sprite table base address register 23 V9938 MSX-VIDEO USER'S MANUAL Example of VRMI allocation in MULTICOLOR mode OOOOOH Sprite Generator Table (1024 bytes) 00400H Pattern Name Table (768 bytes) 00700H 00700H ............... Sprite attribute table (128 bytes) 00780H 00800H 00800H OOCOOH Pattern Generator Table (2048 bytes) OlOOOH A maximum of 32 pages may be allocated in the same manner (using a l28K-byte VRAl>l). lFFFFH 24 V9938 MSX-VIDEO USER'S MANUAL GRAPHIC 1 MODE Characteristics - 8 dots (w) x 8 dots (h) 256 types 32 (w) x 24 (h) patterns 16 colors out of 512 colors (per screen) Sprite mode 1 4K bytes Pattern size Patterns Screen pattern count Pattern colors Spr i te mode VRAM area per screen Controls - Pattern font : VRAM pattern generator table - Screen pattern location : VRA~I pattern name table - Pattern color codes 1 & o : Can be specified as a group for each 8-pattern set, in the VRAM color table - Background color code Low-order four bits of R#7 - Sprites VRAM sprite attribute table, VRAM sprite pattern table Ini tial Settings 1. Mode and Register Settings MSB 7 6 5 4 3 2 1 0 LSB R#O I 0 DG 1IE21 IEll 0* 0*1 0*1 0 Mode register 0 R#l I0 BL 1lEO 1 0*1 0* 0 1SI 1fi'.AG Mode register 1 R#8 IMS LP ITP ICB IVR 0 ISPDIBW Mode register 2 R#9 ILN 0 lSI I SO IlL EO :*NTIDC Hode register 3 * Examples of settings in GRAPH IC 1 mode ** Indicates negative logic 25 V9938 MSX-VIDEO USER'S MANUAL 2. - Pattern Generator Table Settings The pattern generator table is an area that stores the pattern fonts. Each pattern has a number from PNO to PN255. The font for each pattern is constructed from 8 bytes. Set the beginning (head) address of the pattern generator table in register R#4. MSB 7 6 5 4 3 1 2 o R#4 o loSB Pattern generator table base address register Pattern generator table (X=l, 0=0) MSB 76543210 LSB 0 OOXXXOOO 1 OXOOOXOO 2 XOOOOOXO 3 XOOOOOXO 4 XXXXXXXO 5 XOOOOOXO 6 XOOOOOXO 7 00000000 8 XXXXXXOO 9 XOOOOOXO 10 XOOOOOXO 11 XXXXXXOO 12 XOOOOOXO 13 XOOOOOXO 14 XXXXXXOO 15 00000000 2040 XOXOXOXO 2041 OXOXOXOX 2042 XOXOXOXO 2043 OXOXOXOX 2044 XOXOXOXO 2045 OXOXOXOX 2046 XOXOXOXO 2047 OXOXOXOX Base address Pattern number 0 Pattern number 1 Pattern number 255 26 V9938 MSX-VIDEO USER'S MANUAL 3. Pattern name table settings - The pattern name table is composed of one byte for each screen pattern. Each byte specifies a unique pattern. Set the beginning (head) address of the pattern name table in register R#2. MSB 7 5 6 4 3 2 o 1 LSB R#2 Pattern name table base address register Pattern name table Base address o o ( 0, 0) ( 1, 0) 1 o 0 1 2 3 ( 2, 0) 2 1 32 33 34 35 22 704 705 23 736 737 1 2 31 3 X "H · 63 · (31, 0) 31 ( 0, 1) 32 "±~ • y 767 Screen display correspondence (31,23) 4. 767 (byte) Color register settings MSB 7 6 5 4 3 1 2 R#7 o LSB Text color/Back drop color register Specifies backdrop color code Ignored 5. Color table settings - T