Page 3 of 11

Re: TFMSX Arrives

Posted: 17 Apr 2021 11:31
by Icky
Great work @terriblefire. Am watching this one with interest. I never had an MSX but did want one back then.

Re: TFMSX Arrives

Posted: 18 Apr 2021 20:17
by terriblefire
Right i have it up and running Monkey Academy ... no keyboard yet but sound is working.

I have made some mistakes with this revision but they're easily fixed on the next respin.

Re: TFMSX Arrives

Posted: 18 Apr 2021 21:33
by arkadiusz.makarenko
I am slowly starting keyboard firmware.
I have set up project and slowly starting writing key mappings to mimic the grid.

Re: TFMSX Arrives

Posted: 18 Apr 2021 21:40
by terriblefire
arkadiusz.makarenko wrote: 18 Apr 2021 21:33 I am slowly starting keyboard firmware.
I have set up project and slowly starting writing key mappings to mimic the grid.
I have made some mistakes we might need to send data back to the CPLD by SPI or something...

But I also built a second MSeX ...

941C5E6A-0FBE-4C8B-8D09-AF250F4457D8.jpeg

Re: TFMSX Arrives

Posted: 18 Apr 2021 21:50
by arkadiusz.makarenko
@terriblefire
For keyboard data?

Re: TFMSX Arrives

Posted: 18 Apr 2021 22:26
by terriblefire
arkadiusz.makarenko wrote: 18 Apr 2021 21:50 @terriblefire
For keyboard data?
Yeah i think we have 7 wires connected between the CPLD and ARM... so 4 are output from the CPLD with the scan row and the arm can just write back on a clock and mosi line. I think they are all the available lines on PC0-PC7 (PC5 seems to be missing/NC on this chip).

It would also be useful if the ARM could hold a line low for 10uS (or more) to save me counting to 32768 for a power on reset timer. It would save about 40 registers in the CPLD.

EDIT: i'll also send a TFMSX to you for testing... i've not got DB9 joystick sockets spare to hand so you'll need 2 of those and a 2.4mm 5V power supply that can do about 750mA.

Re: TFMSX Arrives

Posted: 18 Apr 2021 22:54
by arkadiusz.makarenko
Stm32 has plenty various counters, but it takes a while before they can be setup on after boot, same with gpio?
I have never measured it but I suspect it may take even few hundred ms?

Re: TFMSX Arrives

Posted: 18 Apr 2021 22:59
by terriblefire
arkadiusz.makarenko wrote: 18 Apr 2021 22:54 Stm32 has plenty various counters, but it takes a while before they can be setup on after boot, same with gpio?
I have never measured it but I suspect it may take even few hundred ms?
it actually doesnt matter... so long as at some point we go low for a period... the VDP needs 10uS of reset low with the clock running... but everythign could run for a few ms then go into reset again .

Re: TFMSX Arrives

Posted: 19 Apr 2021 07:21
by arkadiusz.makarenko
terriblefire wrote: 17 Apr 2021 10:22

Code: Select all

PC0 = ARM PIN8
PC1 = ARM PIN9
PC2 = ARM PIN10
PC3 = ARM PIN11
and the return signal to the MSX

Code: Select all

 
 PB0 = ARM PIN 14
 PB1 = ARM PIN 15
 PB2 = ARM PIN 16 
 PB3 = ARM PIN 17
 PB4 = ARM PIN 20 
 PB5 = ARM PIN 21 
 PB6 = ARM PIN 22 
 PB7 = ARM PIN 23
 
Based on this.
SPI1 is available on already connected pins PA (PA4-7). (NSS,SCK,MISO,MOSI)

Re: TFMSX Arrives

Posted: 19 Apr 2021 08:59
by terriblefire
Basically I made a mistake because i put the prototype together in 2-3 days.. .

I thought the Keyboard control went through the PSG IO but it doesnt it goes through the PPI controller. So there are 16 pins uselessly connected between the ARM and the PSG (well maybe not 100% uselessly because we could do joysticks that way). Even after that I thought their might be a chance to read the GPIO from the PSG by redirecting a read for the PPI Port B.. but alas no.. you need to set an address register in the PSG to get it spit it out..

TBH The MSX is so slow we can get away with this alternative approach for this rev 0 to prove all the bits work and of course we'll fix it in the rev 1. But since i literally had no idea what i was doing and simply slapped together a proto board i'm not disappointed.

The following pins are connected between the ARM and the CPLD.

Code: Select all

ARM PIN 8 
ARM PIN 9 
ARM PIN 10 
ARM PIN 11
 
ARM PIN 24 
ARM PIN 37 
ARM PIN 38 
I think these are all PORT C not PORT A as you said. There are also 2 spare pins on the CPLD that could be patched over to ARM PINS if needed.

The following pins are not connected to anything on the ARM..

Code: Select all

ARM PIN 2 
ARM PIN 3
ARM PIN 4 
ARM PIN 28
ARM PIN 29 
ARM PIN 33
ARM PIN 39 
ARM PIN 40
ARM PIN 41 
ARM PIN 43
ARM PIN 50 
ARM PIN 51
ARM PIN 52 
ARM PIN 61  
ARM PIN 62 
Any of those could be used for the SPI... and we dont need a MISO.. the CPLD has nothing to say :D