Forums

Notifications
Clear all

Splitscreen

13 posts
3 users
6 Reactions
4,338 views
Posts: 6
Members of the MSX ITA Association
(@microtech)
Active Member
Joined: 3 years ago

@daniele really sorry, I was busy (and sick) were you able to do what you wanted? or are you still waiting for my response?


Reply
1 Reply
Members of the MSX ITA Association
(@daniele)
Joined: 3 years ago

Eminent Member
Posts: 12

@microtech hi, I haven't succeeded yet. No problem, if you want to share the files I will gladly study them, thank you very much 


Reply
Posts: 6
Members of the MSX ITA Association
(@microtech)
Active Member
Joined: 3 years ago

This is the routine we use to have screen 12 at the top of the screen and screen 7 at the bottom.
The mechanism for having split screens does not change even if you want to use other screens, but you have to adjust the values (and perhaps also the registers) to be written.
I'm convinced it works but I haven't tested it, if you have any doubts just ask.
I hope it is useful to you


Reply
1 Reply
Members of the MSX ITA Association
(@microtech)
Joined: 3 years ago

Active Member
Posts: 6

renamed file from .gen to .txt otherwise it is filtered away


Reply
Posts: 6
Members of the MSX ITA Association
(@microtech)
Active Member
Joined: 3 years ago
esempio:
	ld hl,param1
	call entp9
	... fai quello che vuoi, anche modificare il contenuto della tabella stessa
	call entp10
	ret

; tabella da passare ad entp9 come param1
param1:
	defb	2		; 2 righe a cui si vuole interrupt
	defb	100		; numero di riga
	defb	1		; numero di scritture verso vdp
	defb	8		; numero di byte da scrivere
	defb	099h	; porta I/O verso cui scrivere
	defb	0ah, 128	; reg 0 = 0ah	; sequenza valore/registro vdp (128 + 0 = registro 0)
	defb	0, 153		; reg 25 = 0
	defb	01fh, 130	; reg 2 = 01fh
	defb	150, 151	; reg 23 = 150
	defb	207
	defb	1
	defb	8
	defb	099h
	defb	0eh, 128
	defb	8, 153
	defb	03fh,130
	defb	0, 151	
; ---
IE1on
	ld a,(0F3DFh)
	or %00010000	; IE1 = 1
	ld b,a
	ld c,0
	call WRTVDP
	di
	ret
;
IE1off
	ld a,(0F3DFh)
	and %11101111	; IE1 = 1
	ld b,a
	ld c,0
	call WRTVDP
	di
	ret
;
;  ----------------------------- ; new management eff1tabstart defs 2 eff1ptr defs 2 eff1nrows defs 1 eff1ncntr defs 1 ; counter number of operations in a refresh ; ; (temporary var, reloaded with eff1nrows) eff1myhok ; leave in this position call eff1int eff1orghok defs 5 ; entp9: ; start effect ; IN HL -> table param1 push hl di ld hl,0fd9ah ld de,eff1orghok ld bc,5 ldir ld a,0c3h ; jp ld (0fd9ah),a ld hl,eff1myhok ld (0fd9bh),hl pop hl ld a,(hl) ; A = number of rows to stop at ld (eff1nrows),a ld (eff1ncntr),a inc hl ld (eff1tabstart),hl ; save pointer to actual data table ld (eff1ptr),hl ; ; get ready for next line jp eff1getnext ; ; 
eff1int ; called at every interruption; di ld e,1 call vdpReadStatus rrca ret nc call IE1off ld hl,(eff1ptr) ; HL ---> number of operations ld b,(hl) ; B = number of operations inc hl ; HL ---> Data Count ; myhok_1 ; loop of operations on the same line push bc ld b,(hl) inc hl ; HL ---> IO Port ld c,(hl) inc hl ; HL ---> data bytes otir pop bc djnz myhok_1 ; --------- ld hl,(eff1ptr) ; HL ---> number of operations ld b,(hl) ; B = number of operations inc hl ; HL ---> Data Count ; myhok_4 push bc ld b,(hl) ; B = Data Count inc hl ; HL ---> IO Port ld a,(00007h) inc a ; A = vdp register write port cp (hl) inc hl jr nz,myhok_3 myhok_5 call eff1wr ; HL ---> value/register pair; eff1wr must not modify B & HL = HL + 2 dec b ; B must be even (otherwise it is a vdp command) djnz myhok_5 jr myhok_6 myhok_3 inc hl ; HL skip data sent out djnz myhok_3 myhok_6 pop bc djnz myhok_4 ; HL ---> next line to break at ;;; the table "performed" so far must be scanned to update ;;; the copy of the vdp in ram... for now we don't use vdp(23) and we don't update ld a,(eff1ncntr) dec a ld (eff1ncntr),a jr nz,myhok_2 ld a,(eff1nrows) ld (eff1ncntr),a ld hl,(eff1tabstart) ld (eff1ptr),hl myhok_2 jp eff1getnext ; 
eff1wr		; HL ---> coppia valore/registro
;		; eff1wr non deve modificare B & HL = HL + 2
	ld c,(hl)	; C = valore scritto
	inc hl
	ld a,(hl)
	inc hl		; HL = HL originale + 2
;
;eff1wr_2
	push hl
	and %00111111	; A = numero del registro
	ld hl,0f3dfh ; default vdp(0..7)
	ld e,a
	ld d,0		; DE = numero del registro a 16 bit
	cp 8
	jr c,eff1wr_1
;			; vdp(8..23)
	ld hl,0ffe7h - 8
	cp 24
	jr c,eff1wr_1
	; vdp(25..27)
	ld hl,0fffah - 25
eff1wr_1
	add hl,de
	ld (hl),c	; scrivi nuovo valore
	pop hl
	ret
;
; 
eff1getnext ; IN HL ---> line to give the next break to; OUT (eff1ptr) ---> number of operations of the next interrupt; ; write in vdp(19) the next line to interrupt ld a,(hl) ; A = line to interrupt ld bc,(0ffe7h - 8 + 23 -1) ; b = vdp(23) add a,b out (099h),a ld (0FFE7h - 8 + 19),a ld a,19 + 080h out (099h),a inc hl ; HL ---> number of operations ld (eff1ptr),hl call IE1on ei ret ; ; 
entp10 ; stop effect ; IN // ; OUT // ; ld hl,eff1nrows entp10_1 ld a,(eff1ncntr) cp (hl) jr nz,entp10_1 ; di ld hl,eff1orghok ld de,0fd9ah ld bc,5 ldir ; ; vdp(19)=0 xor a out (099h),a ld (0FFE7h - 8 + 19),a ld a,19 + 080h out (099h),a ; call IE1off ei ret ; ; 
; effend ; leave for last ; --- ;

Reply
Posts: 6
Members of the MSX ITA Association
(@microtech)
Active Member
Joined: 3 years ago

I made a bit of a mess trying to attach (.gen files don't seem welcome), in the end there is both an attachment and a text


Reply
1 Reply
Members of the MSX ITA Association
(@daniele)
Joined: 3 years ago

Eminent Member
Posts: 12

@microtech Thank you very much indeed!! I will study it thoroughly.


Reply
Page 2 / 2
Share: