Fuzix the new Uzix for MSX ??

Página 5/9
1 | 2 | 3 | 4 | | 6 | 7 | 8 | 9

Por Grauw

Ascended (10162)

Imagen del Grauw

01-01-2015, 16:42

Alex: Nice! Smile

geijoenr: Pasting XML is indeed iffy, but you can link to the XML file.

Por geijoenr

Champion (275)

Imagen del geijoenr

01-01-2015, 17:17

nevermind,
it seems to work anyway. I cannot "probe" for the megaflashrom on the emulator but I can send/receive.

Por geijoenr

Champion (275)

Imagen del geijoenr

01-01-2015, 19:31

some good progress here,
I can already detect the type of sdcard in the megaflashrom.

I am trying to reuse that generic spi driver contributed to fuzix, the problem is that in msx
we need to switch slots before accessing the interface; the easy way is to switch before and after each rw operation,
but that would make it painfully slow; so I am trying to find some solution, but I also might just do a new driver
from scratch.

E.-

Por Manuel

Ascended (18252)

Imagen del Manuel

01-01-2015, 19:34

geijoenr wrote:

typo: typographic error.

I know what you meant with 'typo', but I didn't know what typo you meant. What was mistyped?

Quote:

I am struggling a bit with the megaflashrom extension for msx. it doesn't show the subslots.
I think the xml I have is outdated, but is the one in the source tree 0.11.0.

Yes, as it has a built in slot expander, the slot structure is not visible in the XML file. It was much easier to implement it that way. The slot structure is hardcoded into the source file which I pointed to earlier. The XML file has not been changed after 0.11.0 release. What you have is it.

Do note that the emulation of MegaFlashROM SCC+ SD was mostly just enough to get everything running. It has some shortcuts that may give problems when you rely on them by accident. So, some stuff may work on openMSX but not on real MSX. Be careful! (Especially with waiting for things, or checking for errors... flash or SD card errors are mostly not implemented, neither is any timing!)

Por geijoenr

Champion (275)

Imagen del geijoenr

01-01-2015, 20:31

@manuel it looks to me that the address(es) for the /CS signal enable/disable should be the same and that those cannot
at the same time overlap the addresses for R/W. that's the typo.

Quote:

#4000-#57FF: SD card access (R/W)
--> #4000-#4FFF: /CS signal = 0 - SD enabled
#5000-#5FFF: /CS signal = 1 - SD disabled

ok, I take into account the emulated interface is not complete. I won't assume it works until tested in real hw.

Por Guillian

Prophet (3457)

Imagen del Guillian

01-01-2015, 20:49

@geijoenr:
In #4000-#57FF you can read or write to the SD card.
If you use #4000-#4FFF you will access the card with the /CS signal = 0 (SD enabled)
In #5000-#57FF the access is done with /CS signal = 1 (SD disabled)

Por Manuel

Ascended (18252)

Imagen del Manuel

01-01-2015, 21:35

Right, so as I said: there's no typo Smile

Just test on openMSX, but never assume it works on real hardware as soon as you tested that. And please program against the specs (see the mentioned datasheets), not the openMSX implementation.

Por geijoenr

Champion (275)

Imagen del geijoenr

01-01-2015, 23:53

@guillian, I am still confused; is /CS different than the SD slot select in #5800? if so, how should I use the #5000 addresses?
In the generic SPI driver I am trying to plug the megaSD to, CS is raised before sending a command, then lowered. Nothing is sent while doing so. After that, the command is sent. I had assumed that was the same as selecting the sd card using #5800, then sending using #4000.

Por geijoenr

Champion (275)

Imagen del geijoenr

02-01-2015, 00:27

btw, I am starting to test in real hw, FUZIX is cool Big smile
https://plus.google.com/104241331103175613766/posts/KQPLQLELyvS

Por Guillian

Prophet (3457)

Imagen del Guillian

02-01-2015, 09:46

geijoenr wrote:

I am still confused; is /CS different than the SD slot select in #5800? if so, how should I use the #5000 addresses?

Yes, it is different.
Writting to #5800-#5FFF selects a card (bit 0 of data)
The /CS signal of the select card will depend on the memory range you use to access the card.
The /CS of the other card will be set to 1.

So if you read #5000 both cards will have their /CS set to 1. (both disabled)

geijoenr wrote:

In the generic SPI driver I am trying to plug the megaSD to, CS is raised before sending a command, then lowered. Nothing is sent while doing so. After that, the command is sent. I had assumed that was the same as selecting the sd card using #5800, then sending using #4000.

Bear in mind that it is /CS not CS. This means negative logic. So "0" (low) is active/selected, and "1" (high) the opposite.
So when you select card 1 (#5800 = 0), the /CS signal of card 2 is "1".
If you need to set card 1 /CS = 1, you can just read #5000. Then send the command in #4000 (to set its /CS to "0").

Página 5/9
1 | 2 | 3 | 4 | | 6 | 7 | 8 | 9