MSX emulator on hacked Game & Watch

Page 2/3
1 | | 3

By Sylver78

Rookie (18)

Sylver78's picture

24-05-2022, 18:24

@Manuel : Ok I managed to make it run on my development environment in linux, the linux code source of blueMSX was not correct to load sunrise ide rom. Anyway I managed to load the sunrise ide driver, the msx dos 2.2 rom, the hdd image and everything seems ok, and I can run ys2HDD by entering the correct commands.
Now the next steps is to make this run on the real hardware. The only issue I see it that there is a "huge" buffer of 512*256 bytes (= 128kB) to store sector datas ( https://github.com/sylverb/blueMSX-go/blob/09e94403c69d82a32... ).
Using a 128kB buffer for IDE HDD support on the G&W is not possible as I currently have about 64kB of free RAM.
When running YS2 HDD, the maximum buffer usage I've seen was 512*32 = 16kB of RAM. if 16kB is a maximum, then it's acceptable. Elseway I'll have to rework the code so it use smaller buffers ... So do you know if there is a maximum for sector count on MSX ?
Moreover the flash memory is also very limited in the G&W. For standard 360 & 720kB disks images, I've added a lzma compression at tracks level (each tracks of 9 sectors is compressed and I have an offset table used to find where data are for each track/side), so the emulator is decompressing requested track at runtime. It is something that I'd like to do on ide disk images, but for that I'd need some specification describing the structure of hdd ide dsk files. Do you know if there is such specification available somewhere ?
Thanks

By Manuel

Ascended (18776)

Manuel's picture

24-05-2022, 22:23

Ah, that buffer is in the emulated IDE device. In openMSX it seems to be 512 bytes: https://github.com/openMSX/openMSX/blob/efdac0a8c6236eceab58...
So, apparently you can make it smaller.

The sector count directly depends on the size of the image right? You can just put a limit on that, I guess.

I don't know a specification of the format, but it should be in the openMSX (and probably blueMSX) source code somewhere... e.g. in the diskmanipulator code in openMSX.

By Sylver78

Rookie (18)

Sylver78's picture

24-05-2022, 23:24

Thanks, I managed to run YS2HDD on my G&W by using a 16 kB buffer, but I'll rework the code so it just works with 512 bytes buffer, it'll make thing simpler to handle compression too.
Regarding the sector count, it is written by the sunrise IDE driver (when writing in register at address 2), when I add some traces, I see that the amount of sector read at once can takes many values between 1 and 32, but I have no idea why this is changing, it seems to be handled by the sunrise IDE bios.
I still have some work to do ...

By Sylver78

Rookie (18)

Sylver78's picture

26-05-2022, 10:32

Ok I managed to setup everything correctly, now it's only using 512 bytes buffer for IDE HDD dsk and I have also added compressed disks support (at sector level for now so It's compressing 512 bytes blocks, I'll check later if I change this to compress by blocks of 9 sectors like on 360/720kB disks).
Now I have to check if using nextor instead of MSX-DOS could be useful in any way ...
I'll also work on adding a cheat engine Wink

By Sylver78

Rookie (18)

Sylver78's picture

26-05-2022, 10:40


By Manuel

Ascended (18776)

Manuel's picture

26-05-2022, 10:50

Next: need a keyboard to type DOS commands! Tongue

By Sylver78

Rookie (18)

Sylver78's picture

26-05-2022, 11:03

There is one, you can see I entered "dir" command Wink
But for now it's not the most practical thing to use, use left/right to go through all available keys and press A to press key. Anyway I managed to run YS2 HDD Wink


By Manuel

Ascended (18776)

Manuel's picture

26-05-2022, 15:11

Cool Smile My son has the Mario Bros version of this gadget. But I guess I shouldn't hack it... (Not something for me anyway.)

By Sylver78

Rookie (18)

Sylver78's picture

27-05-2022, 10:44

I should have ported openMSX, you would have hacked it to install it Big smile

By Manuel

Ascended (18776)

Manuel's picture

27-05-2022, 13:20

Perhaps! Anyway, if you still decide to go openMSX at some point, you can count on support from the developers.

Page 2/3
1 | | 3