mame icon indicating copy to clipboard operation
mame copied to clipboard

victor9k: Fix very slow floppy disk performance

Open donohoe00 opened this issue 9 months ago • 5 comments

  • Removed support for the 8048 SCP for the sake of simplicity and maintainability (further rationale in the commit msg)
  • Mimic the SCP reset behaviour, now that the SCP is no longer present
  • Fixes around the reading of signals which can be output by both the SCP and the VIAs

Result is a big speedup: retries/timeouts that were happening previously do not occur, and the system now seems to perform as expected.

donohoe00 avatar Apr 11 '25 23:04 donohoe00

I think we’d rather have the 8048 emulation fixed properly rather than removed altogether. We prefer to emulate stuff in more detail where possible, and this should be within MAME’s current capabilities.

cuavas avatar Apr 24 '25 18:04 cuavas

I agree, it oughta be possible to get it to work while actually running the 8048. I can probably be convinced to merge this as-is if you'd agree to make another attempt with the 8048 though. We can help you with the MAME-specific details there. I have way more experience syncing things with 8-bit microcontrollers in MAME than anyone ought to, and Vas is good at that sort of thing too.

rb6502 avatar Apr 25 '25 01:04 rb6502

I did disassemble the 8048 ROM code (that's how I discovered that some of the signals could be either inputs or outputs), but when it comes to understanding and debugging the servo algorithm, I think I'm in over my head. TBH there's also a motivation issue, since getting the 8048 working properly won't lead to any discernible change in the behavior of the emulated machine :-)

What I'd be willing to do however is see if I can come up with a more targeted fix for the slowness issue by addressing the register reading of the problematic signals, without touching anything related to the 8048.

donohoe00 avatar Apr 25 '25 15:04 donohoe00

I've pushed a new, more minimal set of changes, which are functionally equivalent to the old ones, but do not remove any 8048 related code. This leaves the door open to debugging and fixing the drive control algorithm in the future.

donohoe00 avatar May 01 '25 21:05 donohoe00

Converted to draft since I'm making progress on the 8048-related issues.

donohoe00 avatar May 06 '25 12:05 donohoe00

This has been working great for me - tested with lots of file copying with DOS and DOS utilities, making bootable disks, and general use with single and double-sided images. Much more useful with the speed improvements.

Agree this current iteration mimics the timing on the vintage hardware more accurately. I've also tested it over several days and is working reliably for me.

pauldevine avatar Jun 15 '25 16:06 pauldevine

I completely missed that this was ready for review, sorry. Could you sync up and fix the conflict?

rb6502 avatar Jun 15 '25 18:06 rb6502