This is not a book for the raw beginner - rather, it takes the MSX programmer "inside" the computer to see exatly how it works and how to get the most from it.
The first part covers system design, how the BASIC vocabulary relates to MSX machines, and an introduction to machine code. You will find detailed explanations of memory organization, display modes, and the VDP and sound chips.
The second part is concerned with the use of assembly language in the MSX environment. Major sections include:
Whether you need to write high-performance programs, or just want to know how your computer works, this book will be invaluable. We feel tahat it will rapidly become the standard text for MSX programmers who want to do more than just write BASIC programs.
Table of Contents |
1. INTRODUCTION | 1 |
Overview | 1 |
Memory Organization | 2 |
Input/Output Ports | 4 |
Tape Interface | 4 |
Display Modes | 5 |
The VDP and Sound Chips | 5 |
VDP Display Structure | 7 |
| 10 |
| 10 |
| 12 |
General Instruments AY-3-8910 Programmable Sound Generator | 14 |
|
2. MSX BASIC | 15 |
Variables and Functions | 16 |
| 17 |
Graphics Commands | 18 |
General Purpose Commands | 18 |
Text Modes | 18 |
Video RAM Manipulation | 21 |
Example Program - redesigning the character set | 23 |
Sprites | 26 |
Example Program - Sprite Designer | 30 |
High Resolution Graphics | 32 |
Example Program - Sketch-Pad | 35 |
Sound | 37 |
Program Storage | 39 |
|
3. MSX BASIC VOCABULARY | 42 |
|
4. Z-80 MACHINE LANGUAGE | 70 |
Microprocessors | 70 |
System Organization | 71 |
Binary and Hexadecimal Representation | 73 |
Logical Operations | 76 |
|
5. THE MSX CONFIGURATION | 95 |
MSX Memory Management | 95 |
Accessing the Sound Chip, VDP and PPI | 96 |
The VDP: a general introduction |
| 96 |
The General Instruments AY-3-8910 Sound Chip |
| 97 |
| 96 |
Interrupt Handling and "RAM Hooks" | 97 |
Example Program - Real Time Clock | 98 |
MSX System RAM Usage | 101 |
Using Machine Code Subroutines from BASIC | 103 |
|
6. THE VIDEO DISPLAY PROCESSOR | 105 |
The Control Lines | 105 |
The VDP Lines | 107 |
Video Display Modes | 110 |
| 111 |
| 111 |
| 113 |
| 113 |
| 114 |
The VDP in the MSX Environment | 116 |
Programming the VDP: hints and tips | 118 |
| 119 |
Character and Sprite Definition Program |
| 119 |
| 140 |
The definer in modes other than Graphics II |
| 141 |
Dynamic Pattern Definition | 142 |
Graphics II Mode as a Bit-Mapped Mode | 143 |
More from Sprites: interrupt switching techniques | 145 |
Two colour sprites | 145 |
Quick VDP Access: avoiding time problems | 148 |
|
7. THE PROGRAMMABLE SOUND GENERATOR | 150 |
The Data Registers | 150 |
The Tone Generators (register 0--5) |
| 150 |
The Noise Generator (register 6) |
| 150 |
The Enables Register (register 7) |
| 150 |
Amplitude Control (registers 8--10) |
| 151 |
Envelope Generator (registers 11--13) |
| 152 |
The I/O Ports (registers 14--15) |
| 152 |
| 152 |
Accessing the PSG in the MSX Environment | 154 |
Programming the PSG | 154 |
Three Channel Music: the computer as a performer | 155 |
Sound Effects on the AY-3-8910 | 158 |
Sound Generation in Software: the one bit sound port | 159 |
|
8. INPUT-OUTPUT: THE COMPUTER'S WINDOW ON THE WORLD | 160 |
Game I/O: joysticks, paddles and touchpads | 160 |
Console input/output | 161 |
Slot Selection | 162 |
Keyboard Scanning: checking individual keys | 163 |
|
Appendix A: Character Codes | 166 |
|
Appendix B: Color Assignments | 167 |
|
Appendix C: Video RAM Table | 168 |
|
Appendix D: Z-80 Instructions | 169 |
|
Appendix E: Extract from the TMS 9118/9128/9129 Data Manual | 172 |
|
Appendix F: Extract from the AY-3-8910 Programmable Sound Generator | 182 |