Boot from external DD

Page 1/2
| 2

By Tisse

Resident (34)

Tisse's picture

07-12-2022, 09:48

Hi,

I just got myself an SVI-787 external disk drive for my SVI-738.
I have learned that I can change the active drive to the external by typing POKE &HF247,1 in basic.
However, at reset it goes back to a: being the active drive.

Is there any way to boot from the external drive? Or is there any easier way to switch the active drive? Would be great if there was a key you could hold on startup to boot from external drive. Is this something that SVI has thought of from the beginning or would I have to modify the startup ROM for this to be possible?

Login or register to post comments

By NYYRIKKI

Enlighted (6011)

NYYRIKKI's picture

07-12-2022, 13:34

I think building a switch to swap drive select signals would be most easy, compatible and straight forward to implement.

By Tisse

Resident (34)

Tisse's picture

07-12-2022, 14:40

Hmm, perhaps. Do you know if there are any instructions on how to do it somewhere? I don't even know where to begin to look for the drive select signals ????

By Tisse

Resident (34)

Tisse's picture

16-12-2022, 08:53

I just got another idea! Would it be easy to modify a diskrom to make the external drive the primary drive and autoboot from it on startup? And if so, would it be possible to make a simple cart with that ROM on?
So if I want to boot from the external drive I simply put in a cart with the modified disk-rom.

By gdx

Enlighted (5999)

gdx's picture

16-12-2022, 10:51

You can try (on emutator) to replace:

AF 32 47 F2 at 010A5h by AF CD F0 7F and FF FF FF FF FF at 03FF0h by 3C 32 47 F2 C9 in the Disk-ROM.

AF 32 47 F2 in assembler corresponds to:

	xor a
	ld (0F247h),a

CD F0 7F is: call 07FF0h

3C 32 47 F2 C9 is:

	inc a
	ld (0F247h),a
	ret

If it works, you can define a key test to select the drive.

By Tisse

Resident (34)

Tisse's picture

19-12-2022, 09:20

Thank you for the suggestion @gdx! I think you're onto a great solution!
But this code didn't work, unfortunately. - Tried it out in OpenMSX, but it still only autoboots from A:
It might be because I use a modified diskrom already, but it should be mostly the same - my ROM also had AF 32 47 F2 at 010A5, so that's where I put the call. By the way - shouldn't it be call 03FF0h (which I assume is AF CD F0 3F) since i put the extra code there? Anyway, I tried that too, but it didn't work either.
I've never coded in assembler, so I'm stumped here.
But if you (or somebody else) want to take a look at my now even more modified disk-rom-file, it's here:
https://www.dropbox.com/s/ka1kff0vz5oxdqz/svi-738_disk_test....

By gdx

Enlighted (5999)

gdx's picture

19-12-2022, 09:33

Tisse wrote:

By the way - shouldn't it be call 03FF0h (which I assume is AF CD F0 3F) since i put the extra code there?

No because Disk-ROM is located at 4000h-7FFFh in the MSX.

By gdx

Enlighted (5999)

gdx's picture

19-12-2022, 11:04

Try to replace: 22 AB F6 by CD E0 7F at 017C5h and,
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF by 22 AB F6 F5 3A E5 FB CB 4F 28 05 3E 01 32 47 F2 F1 C9 at 03FE0h.

With this patch, it boots on the drive "B:" by default or on the drive "A:" by pressing '1' key during the start up.

I don't know if the previous patch is also necessary. Let us know if you encounter a problem or not.

By Tisse

Resident (34)

Tisse's picture

19-12-2022, 13:01

Yes! This one worked when I tried it without the previous test-patch. Both autoboot from second drive and boot from drive 1 if I hold 1.
Thanks a lot! This proves it can be done!

However, the optimal way, for me, would be if boot from a: was default and I boot from b: if I hold B on boot. Would that be a lot harder to do?

By Tisse

Resident (34)

Tisse's picture

19-12-2022, 13:25

gdx wrote:

Try to replace: 22 AB F6 by CD E0 7F at 017C5h .

I think I'm understanding a little bit of this now. CD is call to the next 2 bytes in reversed order. So this is call 7F E0. And in the disk-rom-file this place is located at the end, at 3F E0 (since disk starts at 4000, and 7000 - 4000 = 3000).
And the place in the end that would normally just be FF FF FF is actually free space where we can put new code without changing anything else, right?
And the final command-byte C9 means return, which will make this new code work just as it would have been located in the original space, after 017C7h.
No idea what the rest of the stuff you did there at the end means though Smile

By gdx

Enlighted (5999)

gdx's picture

19-12-2022, 13:38

Tisse wrote:

I think I'm understanding a little bit of this now. CD is call to the next 2 bytes in reversed order. So this is call 7F E0. And in the disk-rom-file this place is located at the end, at 3F E0 (since disk starts at 4000, and 7000 - 4000 = 3000).
And the place in the end that would normally just be FF FF FF is actually free space where we can put new code without changing anything else, right?

You understood well.

Tisse wrote:

However, the optimal way, for me, would be if boot from a: was default and I boot from b: if I hold B on boot. Would that be a lot harder to do?

Replace 3A E5 FB CB 4F 28 05 by 3A E7 FB CB 7F 20 05 at 03FE4h.

Page 1/2
| 2