Difference between revisions of "Spectrum QL"
(→Spectrum QL) |
|||
| Line 7: | Line 7: | ||
* Assembler: VASM | * Assembler: VASM | ||
* Emulator(s): Q-emulator ( http://www.terdina.net/ql/winql.html ) | * Emulator(s): Q-emulator ( http://www.terdina.net/ql/winql.html ) | ||
| − | + | * Tool(s): mdvtool (create MDV images) | |
* Hardware: | * Hardware: | ||
In order to test the final result one can use a floppy-disk replace replacement or Qubide interface to load files from SD card. | In order to test the final result one can use a floppy-disk replace replacement or Qubide interface to load files from SD card. | ||
| + | |||
| + | === Loader === | ||
| + | To load content from a folder or MDV image, you need both the binary and a basic loader, similar to platforms like the ZX Spectrum and CPC: | ||
| + | |||
| + | <syntaxhighlight lang=""> | ||
| + | 10 PROGRAM=RESPR(512) | ||
| + | 15 LBYTES "MYINTRO.BIN",PROGRAM | ||
| + | 20 CALL PROGRAM | ||
| + | </syntaxhighlight> | ||
| + | |||
| + | You can link the folder directly from the Q-emulator or generate a MDV image using mdvtool for distribution. | ||
=== Memory map === | === Memory map === | ||
| Line 48: | Line 59: | ||
setting a 1 give 8 colors at 256x256 with Black, R, G B, C, M, Y and White | setting a 1 give 8 colors at 256x256 with Black, R, G B, C, M, Y and White | ||
| − | The Screen is memory mapped from $20000-$28000, There is no palette - the colors are fixed. | + | The Screen is directly memory mapped from $20000-$28000, There is no palette - the colors are fixed. |
==== Vsync ==== | ==== Vsync ==== | ||
| Line 63: | Line 74: | ||
==== Plotting to screen ==== | ==== Plotting to screen ==== | ||
| + | |||
<syntaxhighlight lang=""> | <syntaxhighlight lang=""> | ||
To be added | To be added | ||
| Line 68: | Line 80: | ||
=== Sound === | === Sound === | ||
| − | |||
The Spectrum QL has 2 channels of internal beeped sound, or AY support via an extension board. | The Spectrum QL has 2 channels of internal beeped sound, or AY support via an extension board. | ||
Speaker Sound commands have to be passed via the Bios, using the same kind of commands as with the keyboard. | Speaker Sound commands have to be passed via the Bios, using the same kind of commands as with the keyboard. | ||
You need to adjust the Pitch settings to change the sound, and you can change the randomness bits to make the sound distorted, It seems it's not possible to change the volume! | You need to adjust the Pitch settings to change the sound, and you can change the randomness bits to make the sound distorted, It seems it's not possible to change the volume! | ||
| + | |||
| + | <syntaxhighlight lang=""> | ||
| + | move.l #$11,d0 ; set sound command | ||
| + | lea .sounddata,a3 ; load sound message payload pointer to a3 | ||
| + | trap #1 ; call dosound | ||
| + | </syntaxhighlight> | ||
=== Additional Resources === | === Additional Resources === | ||
Revision as of 05:48, 28 November 2025
Contents
Spectrum QL
The Sinclair QL (for Quantum Leap) is a personal computer launched by Sinclair Research in 1984, as an upper-end counterpart to the ZX Spectrum. It was aimed at the serious home user and professional and executive users markets from small to medium-sized businesses and higher educational establishments, but failed to achieve commercial success. The Sinclair QL uses a Motorola 68008.CPU with 32-bit internal data registers, but an 8-bit external data bus.
Setting up
- Assembler: VASM
- Emulator(s): Q-emulator ( http://www.terdina.net/ql/winql.html )
- Tool(s): mdvtool (create MDV images)
- Hardware:
In order to test the final result one can use a floppy-disk replace replacement or Qubide interface to load files from SD card.
Loader
To load content from a folder or MDV image, you need both the binary and a basic loader, similar to platforms like the ZX Spectrum and CPC:
10 PROGRAM=RESPR(512)
15 LBYTES "MYINTRO.BIN",PROGRAM
20 CALL PROGRAMYou can link the folder directly from the Q-emulator or generate a MDV image using mdvtool for distribution.
Memory map
$00000 Onboard 48k Rom
$0C000 16K Rom Cartridge
$10000 Onboard I/O
$18000 (R) RTC byte 0 / (W) RTC Reset
$18001 (R) RTC byte 1 / (W) RTC Step
$18002 (R) RTC byte 2 / (W) Transmit control
$18003 (R) RTC byte 3 / (W) IPC link control
$18020 (R) Microdrive/RS232c status / (W) Microdrive control
$18021 (R) Interrupt/IPC status / (W) Interrupt control
$18022 (R) Microdrive Track 1 / (W) Microdrive / RS232C data
$18023 (R) Microdrive Track 2 / (W) Display control
$18063 Screen Mode S---C-O- On Colordepth Screenpage
$20000 Screen 1 Screen Ram
$28000 Screen 2 /
System system (systemvars*)
$2847C System stack pointer*
$28E00 Base of Common Heap*
$2BC00 Free area*
$30000 Running Programs Free area
$37200 Basic area*
$38000 User Stack pointer*
$38000 Prog data*
$40000 Add on ram (up to 512k)
$C0000 Add on peripherals
$E0000 Add on Rom (up to 128k)
$FFFFF End of address spaceVideo display
There are two possible screen modes, configured by bit 3 of port $18063
setting a 0 give 4 colors at 512x256 with Black,Red,Green and White setting a 1 give 8 colors at 256x256 with Black, R, G B, C, M, Y and White
The Screen is directly memory mapped from $20000-$28000, There is no palette - the colors are fixed.
Vsync
Port $18021 bit 3 will go high (1) when Vsync starts, then we need to write a 1 to that same bit at the same port to clear the Vsync event. Therefore, in effect we can write 255 to port $18021, then read from $18021 until it's nonzero to get the Vsync event.
move.b #%11111111, $18021 ; Clear interrupt bits
waitvbl:
move.b $18021,d0 ; Read in interrupt state
tst.b d0 ; Wait for an interrupt
beq waitvblPlotting to screen
To be addedSound
The Spectrum QL has 2 channels of internal beeped sound, or AY support via an extension board.
Speaker Sound commands have to be passed via the Bios, using the same kind of commands as with the keyboard. You need to adjust the Pitch settings to change the sound, and you can change the randomness bits to make the sound distorted, It seems it's not possible to change the volume!
move.l #$11,d0 ; set sound command
lea .sounddata,a3 ; load sound message payload pointer to a3
trap #1 ; call dosound