MSX Assembly Page

Page 2/10
1 | | 3 | 4 | 5 | 6 | 7

By tvalenca

Paladin (747)

tvalenca's picture

18-07-2014, 18:37

Grauw wrote:

Also it just occurred to me I could try to plug in my HX-MU901 keyboard into my CX5MII’s SFG-05, and this works like a charm (key layout is the same, too). So it seems unlikely for there to be a problem.

Wow that's freakin' awesome!

By sd_snatcher

Prophet (3471)

sd_snatcher's picture

19-07-2014, 01:59

Grauw wrote:

Also it just occurred to me I could try to plug in my HX-MU901 keyboard into my CX5MII’s SFG-05, and this works like a charm (key layout is the same, too). So it seems unlikely for there to be a problem.

Yes, you can use it without worries. They're known to have the same pinout. According to Takamichi, the HX-MU900/MU-901 were never sold in Japan.

The only Music keyboards they had to connect to the Panasonic FS-CA1 were the ones from Yamaha: the YK-10 and some other I don't recall the code. This means that the MSX MK standard was based on the SFG-01/05 connector since the beginning.

But the touchpad of your HX-MU901 possibly will have no function when connected to the SFG-05.

By Grauw

Ascended (10061)

Grauw's picture

19-07-2014, 03:02

It doesn’t, or rather, it presses 8 notes at once. On the SFG, the IO0 and IO1 pins are connected to ground through a resistor, so I’m not sure how healthy this is; if you press the multi sensor and a key at the same time, it would connect the output pin to ground… I think the resistor protects the circuitry from getting too high a current flow so it’s ok, but my electronics knowledge is limited.

But other than that, the second question is more or less answered and confirmed, albeit in another direction. The wiring in the service manual or my interpretation of it must be wrong. (It’d still be nice if Manual can try the Yamaha keyboard on his Toshiba module I reckon, just for the hell of it.)

The other two questions remain open, whether IO0 and IO1 are connected on the FS-CA1 as well so the Toshiba’s multi sensor can be used, and what signals the YK-20’s ribbon sends.

By Grauw

Ascended (10061)

Grauw's picture

11-08-2014, 20:47

Well thanks to Sander I found out that what I thought was a ribbon controller on the YK-20 is actually merely a plastic indentation for the music stand (aww), so that settles the third question.

This leaves only one question remaining:

Grauw wrote:

1. The msx.org wiki states that the HX-MU900 and FS-CA1 external ports are identical. However, Toshiba has two pins connected to the Y8950’s IO0 and IO1 pins, these are used to extend the matrix by two rows to read the Multi Sensor. I’d like to find out whether these are also connected. This can be answered by plugging a HX-MU901 into an FS-CA1 and running some tests, or by inspecting high res photos of both sides of the board if anyone has those.

By Grauw

Ascended (10061)

Grauw's picture

16-08-2014, 12:38

Recently Wouter Vermaelen from the openMSX team finished part II of his V9938 VRAM timings article, this time focusing on the pattern modes. These are excellent technical articles and give great insights in the inner workings of the V9938.

Both of these can now also be found on the MSX Assembly Page.

By jltursan

Prophet (2538)

jltursan's picture

16-08-2014, 13:45

Great articles indeed!. It's really nice to see how the knowledge base increases with time Smile

By Grauw

Ascended (10061)

Grauw's picture

20-11-2014, 22:36

I was just looking at the DoCopy routine on the MAP and I think I see some room for optimisation:

;
; Execute a VDP command.
; hl = pointer to 15-byte VDP command data
; hl <- updated
; Modifies: af, bc, de, hl
;
DoCopy:
    ld bc,(15 | 128) << 8 | 99H
    ld de,(17 | 128) << 8 | 32
    di
    out (c),e  ; set indirect register access to r#32 + auto increment
    out (c),d
    ld de,2 << 8 | 0
VDPready:
    di
    out (c),d  ; select s#2
    out (c),b
    in a,(c)   ; read CE flag
    out (c),e  ; back to s#0, enable ints
    ei
    out (c),b
    rra
    jp c,VDPready
    ld c,9BH
    outi       ; 15x OUTI is faster than OTIR
    outi
    outi
    outi
    outi
    outi
    outi
    outi
    outi
    outi
    outi
    outi
    outi
    outi
    outi
    ret

When there is no command currently executing it is just 1 cycle faster than the original DoCopy, however when it needs to wait the loop is 22 cycles shorter (19%) so it should be able to respond a little faster. Interrupts are disabled for a shorter time as well.

At the time I originally wrote it I didn’t know yet that you do not need to wait between VDP register writes (only VRAM writes). I haven’t tested it so I won’t update the MAP just yet, but I thought it’d be nice to post here.

p.s. BiFi objects to the name DoCopy, so if you want you can call it VDP_ExecuteCommand :). Fun fact: I inherited the name from Stefan Boer’s VDP course.

By Grauw

Ascended (10061)

Grauw's picture

20-11-2014, 21:44

(double post)

By hit9918

Prophet (2905)

hit9918's picture

20-11-2014, 23:14

More inspiration for bios improvement Smile
When the vertical blank interrupt would pick his status register on his own, all the other codes could be faster.

with vblank interrupt restoring R15 via mirror byte, the wait code goes

	... b = 15, c = 0x99 ...
	ld a,2
	ld (RG15SAV),a	;like with mapper. first write mirror byte, then hardware.
	di
	out (c),a
	ei		;z80 early EI thing
	out (c),b
wait:	in a,(c)	;if interrupt occures, it restores status via rg15sav
	rra
	jp c,wait
	dec c
	15xouti
	ret

The wait code is so much shorter. It feels like the OS has made the hardware faster Smile
And finaly one could snip all the opcodes till the wait.
Like, for the whole duration of the sprite engine no change is needed.
"before any call to executecommand, call begincommand". like opengl glbegin/glend things Smile

but where is RG15SAV? The assembly page has a link for it, but it doesnt work Smile I fear bios got none, then one must snip another byte in USR.

By Grauw

Ascended (10061)

Grauw's picture

21-11-2014, 01:23

RG0SAV: equ 0F3DFH
RG8SAV: equ 0FFE7H
RG25SAV: equ 0FFFAH

So RG15SAV is at 0FFEEH.

I’ll update the MAP, but not tonight cause it’s past bedtime Smile.

By the way I just gave the fast loops article a thorough cleaning.

Page 2/10
1 | | 3 | 4 | 5 | 6 | 7