Skip to content

unix_main: Support specification of multiple disc images.#18

Open
jepler wants to merge 4 commits intoevansm7:mainfrom
jepler:multidrive
Open

unix_main: Support specification of multiple disc images.#18
jepler wants to merge 4 commits intoevansm7:mainfrom
jepler:multidrive

Conversation

@jepler
Copy link

@jepler jepler commented Mar 30, 2025

Two disc images can now be mounted in umac, by specifying two -d arguments.

However, it's only compatible with one of the two system images I tried it with: System-Disk-1-1g.dsk hates it, quickly exiting after attempting to access the address 0x(de)adbeef. But HyperCardBootSystem7.img is happy and reaches the desktop.

So, it's safe to say this needs more work.

image

@jepler
Copy link
Author

jepler commented Mar 30, 2025

Ah with the update it's happy with both system versions I tried. 🎉

image

@jepler jepler marked this pull request as ready for review March 30, 2025 02:46
@jepler
Copy link
Author

jepler commented Apr 3, 2025

As an alternate implementation method I've also prototyped basilisk-like emulator operation opcodes, which required an addition to musashi.

        cpu_write_word(new_sp, 0xA02F); // PostEvent
        cpu_write_word(new_sp+2, 0x7180); // emul_ret
        m68k_set_reg(M68K_REG_PC, new_sp);
        m68k_set_reg(M68K_REG_SP, new_sp);
        int used = m68k_execute(20000);

(while still avoiding calling m68k_execute recursively, which I don't think would work properly)

the implementation in mushashi is quite simple: the range of emul_op opcodes just call m68k_end_timeslice. The emulator loop outside it would need to check the IR register to see if it's an emul_op, and act accordingly. For emul_ret, nothing more need be done besides the early return, but for other calls like (say) M68K_EMUL_OP_SONY_xxx that might be created in the future it would have to call into the right code in the disc emulator. And in the end it might then be possible to get rid of the the PV_SONY_ADDR method currently used to call into the sony emulation code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments