sikthehedgehog / indigo

Indigo operating system
zlib License
57 stars 4 forks source link

Look into Magistr 16 hardware #6

Open sikthehedgehog opened 7 years ago

sikthehedgehog commented 7 years ago

Just for the sake of it. I doubt I'll do much with it but I need to put this somewhere and the issue was brought up in this repo earlier. It does seem to take its OS on a cartridge though, so it's not like getting Indigo running on it is completely out of the question...

sikthehedgehog commented 7 years ago

Great, the BIOS is missing (mapped from $400000 onwards, not on the cartridge), so it looks like this will be stuck until somebody dumps the thing since I imagine it's what has the code to control the extra hardware.

Maybe @murgatroid79 knows something >_>; (any way to contact, btw?)

murgatroid79 commented 7 years ago

Photo board can be found here: http://www.nedopc.org/forum/viewtopic.php?f=71&t=9360 And here: http://zx-pk.ru/threads/12541-magistr-16-(sega-fdd-mouse-keyboard-).html The dump file can be found here: http://pscd.ru/games/smd/msmd/1253-magistr-16.html Only in the emulator this ROM hangs at the start ... magistr-16-logo

If interested I can make additional photo boards, screenshots of the built-in programs.More about this console you can tell HardVareMan from the SpriteMind forum, he also has Magistr16

For contact with me is mail: murgatroid_79@mail.ru

sikthehedgehog commented 7 years ago

Photos are useless, what's missing is a ROM dump. The program looks for the BIOS at the address I mentioned earlier, doesn't find it and then throws that error message since it can't proceed further.

Thanks for the e-mail address :v

murgatroid79 commented 7 years ago

What ROM do you mean? System cartridge I dumped, it is the BIOS of the system. And only with it the additional peripherals And the chip ROM-W29C020CP90B- (256K X 8 CMOS FLASH MEMORY) 32pin PLCC is not a BIOS, it's an internal disk for saving (BASIC programs, pictures, chess games ...)    Without a system cartridge, the console becomes the usual SegaMD clone. The mode is determined by contact B32 (! Cart).If it's low, it means a game cartridge. If high, then the system cartridge magistr16. The board has a decoder ATF16V8B, it allocates the address space.

sikthehedgehog commented 7 years ago

Well, the program in the cartridge looks for the string "BIOS" at address $400000 and refuses to boot if it doesn't find it there, so I'd assume there's meant to be something in that place. I'll recheck later (maybe it's checking if Flash is initialized instead? since the check is a bit more complex than just outright failing if the string is missing) but there's certainly memory in that location.

And yeah it doesn't touch anything else if this check fails, if there's more RAM it needs to be enabled first (but not sure if the "initializing DRAM" phase is for enabling more RAM or for clearing VRAM).

sikthehedgehog commented 7 years ago

Well, the program in the cartridge looks for the string "BIOS" at address $400000 and refuses to boot if it doesn't find it there, so I'd assume there's meant to be something in that place. I'll recheck later (maybe it's checking if Flash is initialized instead? since the check is a bit more complex than just outright failing if the string is missing) but there's certainly memory in that location.

And yeah it doesn't touch anything else if this check fails, if there's more RAM it needs to be enabled first (but not sure if the "initializing DRAM" phase is for enabling more RAM or for clearing VRAM).

EDIT: to make it clear, "BIOS" needs to show up on consecutive addresses which implies 16-bit bus here (and it's done using a long access too), so it's unlikely to be the Flash memory (which has an 8-bit bus? and I saw a MOVEP-like function, so that one is likely mapped every other byte). It's definietly a good way to detect if it's a Magistr 16, I'll give you that.

Either there's more memory there or we're missing something.

sikthehedgehog commented 7 years ago

By-passing the BIOS check was shortlived:

blastem_20170408_224940

This kicks in right during the next phase of initialization, so I guess that whatever it needs to initialize before, it must be critical. You can't get away with just making it continue and ignore the error (in fact, it seems to retrieve a pointer from RAM, so it looks like some structure was meant to be filled in first).

murgatroid79 commented 7 years ago

Here is the topic was on the forum http://gendev.spritesmind.net/forum/viewtopic.php?f=13&t=525&hilit=Magistr16

You can raise the topic there \ revitalize. There are many people interested.

sikthehedgehog commented 7 years ago

OK HardWareMan sent me a dump of his Flash memory and I think I know what's going on:

This probably explains everything (・・ ) The BIOS takes up the first 19½ KB 19 KB, the rest is used for a FAT12 filesystem.

EDIT: whoops, the last 512 bytes were actually configuration. The BIOS itself is actually 19 KB.

murgatroid79 commented 7 years ago

Wow. Still, the flash chip turned out to be a BIOS. Partially. In the instructions, this chip is called a flash drive, so I did not read it (and I did not have a programmer at that time). Arguing in Russian forums, they came to the conclusion that the bios is in the system cartridge. It turns out we were wrong.

murgatroid79 commented 7 years ago

Now I can read this chip on my console ... If necessary.

I'm interested in the lines in the dump "... Initializing BIOS ... Starting H / W init ... Initializing memory ... Initializing RTC ... Initializing FDC ... Initializing keyboard ... Initializing serial ... Initializing parallel .. Initializing DRAM ... Finishing H / W init ... Initializing FAT ... Initializing music ... " Of particular interest is the "Initializing DRAM ..." There is no dynamic memory chip on the motherboard, but there is a slot for the connector. This connector in the instruction is named for the additional memory module.Up to 4 megabytes! image The photo shows the place for installing this module on the bottom of the console. Is it possible that the module is made on the chips of dynamic memory?

sikthehedgehog commented 7 years ago

Partially. In the instructions, this chip is called a flash drive, so I did not read it (and I did not have a programmer at that time).

Well, it is still a drive technically. The first 19 KB are the BIOS, then 512 bytes for (BIOS?) configuration, then the rest is used for a FAT12 filesystem (which is probably the "drive" part).

Of particular interest is the "Initializing DRAM ..." There is no dynamic memory chip on the motherboard, but there is a slot for the connector. This connector in the instruction is named for the additional memory module.Up to 4 megabytes!

The photo shows the place for installing this module on the bottom of the console. Is it possible that the module is made on the chips of dynamic memory?

I wouldn't be surprised, especially since 4MB of DRAM would have been quite more expensive than 4MB of SRAM at the time (it only dropped in price enough relatively recently from what I gather).

I haven't looked at this part of the code so I can't confirm anything, but I should be able to figure out easily since I know where the string is (and can tell what references it, that's how I found the BIOS init code in the first place). I may take a look at it later.

murgatroid79 commented 7 years ago

It will be very good if we can connect 4 MB DRAM. I do not want to confuse you, but see more Cyber_Shell_Learning_Set: image There are several variations: Magistr Genius,Magistr Aspirant,Kombat16... 16 bit combat16 Dumps are here: Reply # 22 http://www.emu-land.net/forum/index.php?topic=72444.0

sikthehedgehog commented 7 years ago

I still don't know how to use this but looks like at least I have enough information to load the BIOS into RAM, so I may go ahead and implement that later (it won't help much until I know how to actually make use of it, mind you).

For the sake of documentation: