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
207 stars 32 forks source link

Mega65/C65: use common F018 DMA core + bug fix #46

Closed lgblgblgb closed 7 years ago

lgblgblgb commented 7 years ago

C65 and M65 emulators uses different source for F018 DMA "DMAgic" emulation, with almost the same content at source level. Let's make a common code base for both, which can handle M65 specialities too, and uses call-backs, to no problem to be used in both emulators.

Also, fix the issue that DMA operation is not restricted for the given 1Mbyte slice but can "over or underflow", which is not the correct behaviour. This is a BUG.

lgblgblgb commented 7 years ago

Ok, both of M65 and C65 emulators use now the shared F018 "core" with callbacks implemented by the emulators, since the internal structures of them are different.