Details
BUY TMS9918 https://www.utsource.net/itm/p/12598619.html
| Parameter | Description | Value |
|---|---|---|
| Type | Video Display Processor (VDP) | - |
| Manufacturer | Texas Instruments | - |
| Year Introduced | 1980 | - |
| Package | 40-pin DIP (Dual Inline Package) | - |
| Clock Frequency | Input Clock (CLK) | 3.58 MHz (NTSC), 3.57 MHz (PAL) |
| Data Bus Width | 8-bit parallel | - |
| Address Bus Width | 14-bit (for internal memory) | - |
| Internal Memory | 16 KB VRAM (Video RAM) | - |
| Text Modes | - | - |
| Mode 0 | 40x24 characters, 16 colors, 256 characters per font set | |
| Mode 1 | 32x24 characters, 16 colors, 512 characters per font set | |
| Graphics Modes | - | - |
| Mode 2 | 64x48 pixels, 16 colors, no sprites | |
| Mode 3 | 128x96 pixels, 4 colors, no sprites | |
| Mode 4 | 256x192 pixels, 2 colors, no sprites | |
| Mode 5 | 160x192 pixels, 4 colors, with sprites | |
| Sprites | - | - |
| Number | Up to 32 sprites (8 per scan line) | |
| Size | 8x8 or 8x16 pixels | |
| Colors | 15 colors per sprite (1 transparent) | |
| Background Color | - | 16 colors |
| Interrupts | - | VBLANK, HBLANK, Sprite collision, etc. |
| Power Supply | - | 5V DC |
| Current Consumption | - | 200 mA typical |
Instructions for Using the TMS9918
Initialization:
- Reset the VDP: Apply a low pulse to the reset pin (RST) to initialize the VDP.
- Set the Mode Register: Write to the mode register (address 0x00) to select the desired display mode (0-5).
Memory Management:
- VRAM Access: Use the address and data buses to read from and write to the 16 KB of VRAM.
- Pattern Generator Table (PGT): Store character or sprite patterns in the PGT.
- Color Table (CT): Define the color attributes for each character or pixel in the CT.
- Name Table (NT): Specify the pattern numbers for each character or tile in the NT.
Display Control:
- Enable Display: Set the display enable bit in the status register (address 0x01) to turn on the display.
- Scrolling: Modify the scroll registers (addresses 0x02 and 0x03) to achieve horizontal and vertical scrolling.
Sprite Handling:
- Sprite Attributes: Write the position, pattern number, and color attributes of each sprite to the sprite attribute table (SAT) in VRAM.
- Collision Detection: Check the collision register (address 0x04) to detect sprite-to-sprite or sprite-to-background collisions.
Interrupt Handling:
- Enable Interrupts: Set the interrupt enable bits in the status register to enable specific interrupts (e.g., VBLANK, HBLANK).
- Read Interrupt Status: Read the interrupt status register (address 0x05) to determine which interrupt occurred.
- Clear Interrupts: Write to the interrupt status register to clear the interrupt flags.
Power Management:
- Power On/Off: Ensure a stable 5V DC power supply is provided to the VDP.
- Power Consumption: The VDP typically consumes around 200 mA of current.
Timing Considerations:
- Clock Frequency: The VDP requires a clock frequency of 3.58 MHz (NTSC) or 3.57 MHz (PAL).
- Synchronization: Use the VBLANK and HBLANK signals for synchronization with the display refresh rate.
By following these instructions, you can effectively configure and control the TMS9918 VDP for various display applications.
(For reference only)View more about TMS9918 on main site
