tofro wrote: Sat Jan 04, 2025 11:05 am
Yep, GENS seems to be a bit long in the tooth for more "modern" systems. It doesn't honour default directories, and the <ALT>+something commands tend to collide with basically everything on a more modern, HOTKEYed system.
BTW: I found that <ALT>+"H" in GENS gives a help screen listing all commands.
So I played with it and did get it to work as advertised...well, at least everything ran as it should. Tried it out first in Q-emuLator and also in QL2K and it worked the same on both. It seems to try and create a high color high resolution picture, but it just flashes the screen between the two images and then has bars coming across. So I figured it was an emulator issue but it behaved exactly the same on my BBQL.
Not quite sure why it's not working. I'm assuming its author had it working successfully. Was there supposed to be any hardware added to it like a Gold Card? The assembly doesn't seem too complex. Part of its internal structure follows the BASIC boot program -- i.e. it sets aside memory in BASIC for 2048+32768+32768+32768, which the code assumes to figure out where each of the two screens are.
Code: Select all
* dithVide for Sinclair QL
* /interrupt handler in supervisor mode/
* (C) Omega 2006 (omega.webnode.com)
nm_frms EQU 900
nm_lins EQU $0fa
ln_wait EQU $0006
bg_wait EQU $02d7 2e6
sv.plist EQU $3c offset, frame linked list 2803c
sv.pcint EQU $35 copy of system interrupt
pc_intr EQU $18021 interrupt hw status register
mc_stat EQU $18063 master chip settings
screen1 EQU $20000
screen2 EQU $28000
* bit 1 - screen off (1)
* bit 3 - lores (1), hires (0)
* bit 6 - (0) PAL, (1) NTSC
* bit 7 - (0) VRAM starts $20000, (1) $28000
; save registers
; goto supervisor mode
start trap #0
movem.l d0-d7/a0-a6,-(a7)
; disable interrupt
ori #$0700,sr
lea ssvsp,a0
move.l sp,(a0) save stack
move.b #$80,mc_stat switch to 2nd vram, hires
lea stack,sp new stack address
move.l #$28000,a6 sys_vars
lea frames,a0
move.w #nm_frms,(a0)
; save system variables
move.l #screen2,a0
lea screen,a1
move.w #$8000,d0
jsr ldir
lea start,a0
add.l #2048,a0 add code_size in basic
add.l #$8000,a0 addr of scr1 gfx
move.l a0,a2
add.l #$8000,a2
move.l #screen2,a1 addr of vram1
move.w #$8000,d0
jsr ldir
move.l a2,a0
move.l #screen1,a1
move.w #$8000,d0 next gfx follows
jsr ldir
; jsr clscr
lea flipper,a0 address of vector
lea lores,a2 address of routine
move.l a2,4(a0) save routine address to vector
move.l a0,$2803c save vector address to sv.plist
andi.w #$f8ff,sr ei (enable interrupt)
loop jmp loop
exit ori.w #$0700,sr di
movem.l (a7)+,a0 restore stack
; restore system variables
move.l a6,a1
lea screen,a0
move.l #$8000,d0
jsr ldir
move.b #0,mc_stat switch to screen1, hires
; exit
lea ssvsp,a0
move.l (a0),sp restore stack
movem.l (a7)+,d0-d7/a0-a6
moveq #0,d0 return no error
move.w #$0800,sr user mode, EI
rts
; clear both screens
clscr move.l #$8000,d0
move.b #$ff,d1
jsr clmemb
move.l #$8000,d0
move.b #0,d1
jsr clmemb
; ldir (memory move routine) slow
; a0 - from / a1 - to / d0 - size
ldir move.b (a0)+,(a1)+
dbra d0,ldir
rts
; clmemb (clear mem) slow
; a0 - where / d0 - size / d1 - with what
clmemb move.b d1,(a0)+
dbra d0,clmemb
rts
flipper:
dc.l 0,0
lores:
movem.l d0-d7/a0,-(a7)
lea vram_l,a0
eor.b #$80,(a0)
move.b (a0),mc_stat
lea frames,a0
subi.w #01,(a0)
movem.l (a7)+,d0-d7/a0
beq exit
rts
hires:
movem.l d0-d7/a0,-(a7)
lea vram_h,a0
eor.b #$80,(a0)
move.b (a0),mc_stat
lea frames,a0
subi.w #01,(a0)
movem.l (a7)+,d0-d7/a0
beq exit
rts
mixed:
movem.l d0-d4/a0,-(a7)
move.b #%00000010,mc_stat screen off
lea vram_m,a0
move.b (a0),d0
move.b #%10001000,d1
move.w #bg_wait,d4
bg_wlp dbra d4,bg_wlp
move.w #nm_lins,d2
nm_llp move.w #ln_wait,d3
move.b d0,mc_stat
eor.b d1,d0
ln_wlp dbra d3,ln_wlp
nop
nop
nop
nop
dbra d2,nm_llp
eor.b d1,(a0)
lea frames,a0
subi.w #01,(a0)
movem.l (a7)+,d0-d4/a0
beq exit
rts
modes dc.l 0 lores
dc.l 0 hires
dc.l 0 mixed
frames dc.w 0
vram_l dc.b %00001000 ram 0 lores
vram_m dc.b %00000000 ram 0 hires
vram_h dc.b %10000000 ram 0 hires
ssvsp dc.l 0
ds.b $0200
stack
screen
I even created a lower resolution version but no difference -- i.e. 512x184 seemed to work in 128K where I simply changed the assembly to use hex $5C00 instead of $8000 and mimicked that in the BASIC: 2048+23552+23552+23552.
The original BASIC boot program also starts the monitor and creates a RAM disk, but all that seems to not be needed. Attached is a zip file with 3 MDV images. The first is how it was distributed, but with just the DOOM image files since I ran out of space on the MDV image. The other two use a simplified BASIC boot program that directly runs the binary (I cal it hires_bin) and asks for the image files. But I was not able to get the high color images on actual hardware, so no idea why it's failing.
[Edit: removed HIRES.zip as it was wrong]
[Edit: yes, yes, I call it HIRES...I realize it's not higher dot-pitch, it's more colors, but whatever :-/]