64 sprites on screen

By ARTRAG

Enlighted (6502)

ARTRAG's picture

09-11-2014, 00:17

Refer to the files in the "standard" subdir (the other is a wip to be tested on real HW)
https://sites.google.com/site/devmsx/home/split-screen-on-msx1

The ISR polls the 5th sprite condition on plane 31, when it meets this condition swaps the sat, and you get 32+32 sprites

The key code is here

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Interrupt service routine
;
    code @ 0x0038

    push   hl
    push   de
    push   bc
    push   af
 
     _setVdp 5,0x36		;   SAT at 0x1b00 -> first sat, first 32 sprites
     
	_setVdp 7,0x0E		; 1st background color
	
	in  a,(0x99)		; reset flags from previous interrupt
						; do something here
						; e.g. music or SAT update
 	
 	_setVdp 7,0x0C 		; 2nd background color
 
1:  in  a,(0x99)       	; a = vdp status register
    and 0x1f+64        	; drop flags F and collision flag
    cp  0x1f+64        	; wait on 5th sprite condition on plane 31 
    jp  nz,1b

    _setVdp 5,0x37  	;   SAT at 0x1b80 ->  second sat, other 32 sprites
 	
	_setVdp 7,0x00 		; 3rd background color
	
    pop    af
    pop    bc
    pop    de
    pop    hl
    ei
    ret

Login or register to post comments

By ARTRAG

Enlighted (6502)

ARTRAG's picture

09-11-2014, 10:44

Is there anyone willing to try the two roms in the package on a real HB-10P or an HP-20P ?
It seems (it is to be confirmed) that the older HP-20P, apart the mirroring effect on the ram in page 3, have a HW glitch that makes the 5th sprite flag in the status register not reliable after a while the machine is on.
In this case you should see (in the standard rom) only one sprite bank on the screen.