Nextor - openMSX

Page 2/4
1 | | 3 | 4

By wouter_

Champion (388)

wouter_'s picture

30-03-2014, 22:12

Manuel wrote:

We'll have to investigate this issue. Thanks for reporting it!

We've investigated this. The nextor ROM only boots correctly when the initial mapper segment is segment 0. BlueMSX implements it like this. In openMSX the initial segment is segment 7. On a real MSX the initial segment is undefined (and it remains unchanged after a reset, both emulators already do this).
So this means that the software should have correct boot code in all 8 segments. If you look at the original Sunrise IDE rom, you'll see that is does exactly this.

By Marcelo_Zoffy

Supporter (16)

Marcelo_Zoffy's picture

30-03-2014, 22:34

Hi wouter_,
Thank you!

By konamiman

Paladin (928)

konamiman's picture

30-03-2014, 23:18

Well, the Sunrise IDE driver for Nextor has LOTS of problems. It works on blueMSX and that's enough for me to continue the development of the kernel, but obviously it needs to be completely revamped.

Unfortunately I don't have the time for that, I am struggling enough already to get some free time to develop the kernel. I need someone to take the challenge. But of course it would be a good idea to start by publishing the source code of the driver...

By Piter Punk

Master (184)

Piter Punk's picture

31-03-2014, 06:05

I lost some good time trying to boot openMSX + IDE with Nextor.

After some time I give up trying and all my IDE+Nextor tests are on real MSX (so, I have to create the ROM, save the ROM to SD, goes to the MSX, boot with IDE disabled, flash a new ROM, boot again and see if the changes works).

Well, we need to learn with the bad experiences... so I bring back the old habit to print all the code first, do some desk simulations, change the code, do some desk simulations again, and only after repeat those steps a couple of times I flash the new ROM. Now I have nice tested crashes on real hardware Big smile

BTW, the original Nextor IDE firmware works fine on my two CIEL IDE Interfaces without any great problem.

By Manuel

Ascended (14468)

Manuel's picture

31-03-2014, 08:48

konamiman: instead of revamping it (which is lots of work, I suppose), can you already fix it to have the boot code in all segments, which is presumably a lot less work? Then it will at least work on the real hardware independent of the initial state of the mapper.

By mars2000you

Enlighted (5350)

mars2000you's picture

31-03-2014, 15:09

Or maybe make an alternative version that will work only on openMSX ?

By Manuel

Ascended (14468)

Manuel's picture

31-03-2014, 16:48

The thing is that the current version doesn't run on real hardware, unless you're lucky.... that's a much bigger problem, I think.

By konamiman

Paladin (928)

konamiman's picture

31-03-2014, 17:46

I have been taking a look, and it is very strange...

The Sunrise IDE driver does not perform any bank related work. It just swicthes IDE registers on and off, always maintaning the current bank number (the bank where the driver is located, bank number 7).

All the bank switching is done by the Nextor kernel itself, but this is done basically the same way as MSX-DOS does: the first 256 bytes of each bank are identical, and they contain boot code that first switches bank 0 and then does all the initialization stuff, including a (inter-bank) call to the initialization code in the driver. So, it is theorically already doing what it is supposed to do.

Can someone test any of the standalone Nextor ROMs in OpenMSX and tell me if it works?

By wouter_

Champion (388)

wouter_'s picture

31-03-2014, 18:42

konamiman wrote:

... the first 256 bytes of each bank are identical, and they contain boot code that first switches bank 0 and then does all the initialization stuff ...

This is what i see is happening:
- OpenMSX starts with segment 7 selected (this could happen on a real MSX as well).
- So the Z80 address space region [0x4000,0x8000) now contains region [0x1c000, 0x20000) of the file Nextor-2.0.SunriseIDE.rom.
- Address 0x4000 contains the 'AB' signature for 'bootable' roms. The init vector at address 0x4002 contain the value 0x47d6. But that address (corresponds to file offset: 0x1c7d6) contains a whole bunch of NOPs instead of actual boot code.

The first 256 bytes of each segment are indeed similar (but not identical, i didn't check in detail). So the problem might be that the boot code also uses memory outside that region.

I hope this helps.

By konamiman

Paladin (928)

konamiman's picture

31-03-2014, 22:49

Ok. Could you please try the following:

Open the Nextor ROM file in a hex editor and change the 3rd and 4th byte of each 16K bank, from D6-47 to F6-40.

If that works then I have some hard work to do...

Page 2/4
1 | | 3 | 4
My MSX profile