Need your opinion regarding GR8NET capabilities

Page 10/55
3 | 4 | 5 | 6 | 7 | 8 | 9 | | 11 | 12 | 13 | 14 | 15

By Prodatron

Paragon (1788)

Prodatron's picture

21-11-2015, 14:19

Eugeny_Brychkov wrote:

Please review updated documentation here. Send me email if you want device(s).

Thanks for the update! I just recognized the "math pack". Is there any FAT32 support planned for MSX-DOS?

By Eugeny_Brychkov

Paragon (1081)

Eugeny_Brychkov's picture

21-11-2015, 19:26

Grauw wrote:

The best I/O space IMO would be to use a switched I/O port

I am not sure it is correct implementation at all.
When port #40 is read it returns the complement of the current device ID.
If there're several devices which support same switch port, they all will respond which is electrically wrong even if they respond with the same value.

Grauw wrote:

Question: In the browser, I wonder why WAV files need to be loaded with the TAB key while all other file types are loaded with the RET key?

RET is used to "run" the data. GR8NET can not know beforehand which data is there in order to invoke correct data processing routine. User will explicitly say what to do with data to come. I can of course try to parse http headers, but then I will never release the device as there is no limit to perfection.

Grauw wrote:

Question: Will it come with Nextor DOS?

There will be no driver at all, at least in this revision.

Prodatron][quote=Eugeny_Brychkov wrote:

I just recognized the "math pack". Is there any FAT32 support planned for MSX-DOS?

GR8NET knows nothing about MSX-DOS. It is up to MSX-DOS driver to use GR8NET. For now I do not know how to make it supporting Disk-BASIC or be a "Disk-BASIC device", however I had such wish at the beginning.

By Grauw

Ascended (8318)

Grauw's picture

21-11-2015, 20:11

Eugeny_Brychkov wrote:
Grauw wrote:

The best I/O space IMO would be to use a switched I/O port

I am not sure it is correct implementation at all.
When port #40 is read it returns the complement of the current device ID.
If there're several devices which support same switch port, they all will respond which is electrically wrong even if they respond with the same value.

Only the currently active device is supposed to respond. The inversion can be used by software to detect if a certain I/O bank is available [1]. The switched I/O ports are standard, described in the MSX Datapack vol. 2 appendix 5 (the MAP section is a translation from Japanese) and implemented in several devices, so it must be alright.

[1] “So you can check if certain extensions are available and ready to be accessed by reading back the value you just wrote to the device ID register. If that value is not the complement of what you wrote, then the extensions are not present.”

Either way, 10H has problems, and I/O space is tight while there’s plenty of room in the switched I/O ports space. For a piece of hardware which only occasionally uses I/O ports and has an FPGA to easily deal with the extra logic, I think using switched I/O ports is a natural choice. Then it won’t conflict with other hardware, does not reduce the crowded I/O space, and is safer too because software needs to explicitly switch to your bank before it responds.

Eugeny_Brychkov wrote:
Grauw wrote:

Question: In the browser, I wonder why WAV files need to be loaded with the TAB key while all other file types are loaded with the RET key?

RET is used to "run" the data. GR8NET can not know beforehand which data is there in order to invoke correct data processing routine. User will explicitly say what to do with data to come. I can of course try to parse http headers, but then I will never release the device as there is no limit to perfection.

True that! Just as RET already treats binary, ROM and text files differently I wondered why WAV is an exception.

Eugeny_Brychkov wrote:
Grauw wrote:

Question: Will it come with Nextor DOS?

There will be no driver at all, at least in this revision.

Ah, got it Smile.

By Eugeny_Brychkov

Paragon (1081)

Eugeny_Brychkov's picture

21-11-2015, 20:34

Imagine I select EB as a device number. I write EB into port 40. Which adapter will respond with 14 if there're 4 adapters in the system?

By Grauw

Ascended (8318)

Grauw's picture

21-11-2015, 20:53

If I read port 10H, which adapter will respond if there’re 4 adapters in the system?
[Edit: never mind, you read 11H and which responds is selected by 10H.]

Well, could always use four switched I/O banks. It’s wasteful but still better I guess.

But is there really any harm if they respond with the same value (14H)? If I insert 4 memory mappers in the system and read a mapper I/O port, same thing happens. Some even have a mask so they return a different value, and still nothing breaks (other than the mapper readback value itself which is why it should not be used ;p). To me it seems it is designed to work like that.

Anyway, what is your suggestion for a solution?

By zPasi

Champion (413)

zPasi's picture

22-11-2015, 12:56

Eugeny_Brychkov wrote:

Imagine I select EB as a device number. I write EB into port 40. Which adapter will respond with 14 if there're 4 adapters in the system?

No no! You've got it all wrong!

The idea is, if a software wants to use a certain device, it writes the id to the port #40. The device responds only to its own id. So, there will be no collision.

So, if your device id is EB, you only respond to out (#40),#EB.

There is a sample right there.

LD	A,8
OUT 	(040H),A	;out the manufacturer code 8 (Panasonic) to I/O port 40h
IN	A,(040H)	;read the value you have just written
CPL			;complement all bits of the value
CP	8		;if it does not match the value you originally wrote,
JR	NZ,Not_WX	;it is not a WX/WSX/FX.
XOR	A		;write 0 to I/O port 41h
OUT	(041H),A	;and the mode changes to high-speed clock

By Prodatron

Paragon (1788)

Prodatron's picture

22-11-2015, 13:35

This works for one device, but it should be possible to connect and access four GR8NET devices at the same time.
For using the switched I/O methode it would probably be necessary to have 4 different ID codes for port #40.
Example:
#E8 for the GR8NET with ID0
#E9 for the GR8NET with ID1
#EA for the GR8NET with ID2
#EB for the GR8NET with ID3

If this is all too much work to implemented, what's about using some ports, which seem to be free or at least not used by current/known/popular devices? (e.g. #50-#5f seems to be unused)

By zPasi

Champion (413)

zPasi's picture

22-11-2015, 15:52

Prodatron wrote:

This works for one device, but it should be possible to connect and access four GR8NET devices at the same time.

That makes it a little complicated. But since there are 14 switched i/o ports (#41-#4F), multiple GR8NET devices could use different ports, based on the ID specified with the hardware switches.

But it says "Only one selected adapter can be chosen to be accessed through I/O ports at the time however application still can access adapters’ features available in their memory space." I read this there is no need for multiple i/o port numbers?

By Eugeny_Brychkov

Paragon (1081)

Eugeny_Brychkov's picture

22-11-2015, 17:40

Usage of the ports is restricted to the following functionality:
1. detection of the presence of device (adapters 0, 1, 2 and 3) and cross-checking of conflicts through I/O port;
2. detection of the location of the device (slot ID);
3. changing mapper type (e.g. in plain RAM config special config registers are not accessible, thus to change mapper we need other mechanism - I/O ports).
4. major/minor versions of the hardware which is not so much significant, however is used to evaluate firmware image if it is suitable for specific hardware revision.

I gave it a thought and I think it will not be much issue to implement switched port, but there will be some issues:
1. only one adapter will have to respond with CPL to the port 40, as well as for other ports. It can be achieved the same way I did it now - by choosing "selected" adapter. However if application will "select" nonexistent adapter, none will reply to any port. The remedy is to enumerate all 3 adapters through I/O ports and find if there're any. This is not in contradiction or violation to the switched port definition, but a slight difference, and can be considered as "fault" situation because software is not allowed to choose nonexistent adapter.
2. I would prefer choosing two devices IDs, EBh as suggested (thanks Smile ) and 8Eh (GR8NET), and GR8NET will be located at index 8E. There will be two steps to access adapter through I/O. Application writes 8Eh into port 40h, and if everything is correct one of the adapters replies with 71. Then application can access port 41h to get adapter and register selection reg (the one currently available through @10h) to know which adapter is selected, which is default and which register is selected. Application updates this port at 41h like it currently works with port 10h. Then it works with port 42h the same way as it works with port 11h.

Thus there will be prerequisite to have 8E in the port 40h for adapters to come alive on writes and reads through I/O.
Could be there issue if some other application/system code write to port 40h in the middle of access to the GR8NET? For assembler routine it is rather simple, just use DI/EI, but it is a big question for BASIC. Will user be able to do the following:
OUT &H40,&H8E:A=INP(&H41)
and there will be no code which will change contents of port 40h between execution of these OUT and INP commands?
Of course it seems it is a question of compliance of the other device to the standard (that's why there's CPL returned - code should be required to read current device ID, then process its own, and write CPL or original device ID back into port 40h and only then exit), but I have to be sure that I will not have failures of the adapter operation because of 3rd party non-compliance or failures. We already have examples like previously mentioned "Franky" device.

By edoz

Prophet (2169)

edoz's picture

22-11-2015, 19:22

I really impressed by the document and the pictures of the hardware. It looks very professional and I like the idea having network, ram and SD in one cartridge! Including all the other things, like the pcm and the scc!! And the amazing big support in MSX basic.. Crazy!

Page 10/55
3 | 4 | 5 | 6 | 7 | 8 | 9 | | 11 | 12 | 13 | 14 | 15