lgblgblgb / xemu

Emulations (running on Linux/Unix/Windows/macOS, utilizing SDL2) of some - mainly - 8 bit machines, including the Commodore LCD, Commodore 65, and the MEGA65 as well.
https://github.com/lgblgblgb/xemu/wiki
GNU General Public License v2.0
201 stars 31 forks source link

MEGA65: hyppo HDOS virtualization #331

Open lgblgblgb opened 2 years ago

lgblgblgb commented 2 years ago

As started within the "decent hyppo" project (#140) now let's be a bit more specific and focus on this task here. Some HDOS virtualization is already done, however it should be extended for all currently implemented HDOS traps which is something to do with filesystem. Initially, probably the ones used by BASIC65.

HDOS functions used by MEGA65 'closed' ROM

(the original list with ROM syms and IDs are from BitShifter)

ROM NAME hdos func ID Xemu virtualization status
HYV_CHDIR chdir $0C
HYV_OPENDIR opendir $12 hdos_virt_opendir()
HYV_READDIR readdir $14 hdos_virt_readdir()
HYV_CLOSDIR closedir $16 hdos_virt_close_dir_or_file()
HYV_SETNAME setname $2E half-virtualized, since I always need to know the name set, but hyppo should, as well
HYV_FIND_DE findfile $34
HYV_DLOAD loadfile $36 hdos_virt_loadfile(0) argument is base-addr, since the same can be used for attic
HYV_MOUNT_0 d81attach0 $40 hdos_virt_mount(0)
HYV_UNMOUNT d81detach $42
HYV_MOUNT_1 d81attach1 $46 hdos_virt_mount(1)
lgblgblgb commented 2 years ago

Some already ready work, can be seen above (as part of #140) are: eead98d26426261d55cd85e36c6343b28aff94b8 f1fb78c341cc88d83994dc90d0ed6de87728adc6 2290db0294d446860c4c4932516955d1dca5383a cf92da546413619e2b72172fce0f8d2b43c69f69