mirror of
https://gitlab.com/camelot/kickc.git
synced 2025-01-01 13:30:50 +00:00
Added DMA test that works!
This commit is contained in:
parent
feade71602
commit
9150c891b9
@ -7,7 +7,6 @@
|
||||
// DMAgic VHDL source https://github.com/MEGA65/mega65-core/blob/master/src/vhdl/gs4510.vhdl#L4364
|
||||
// Xemu emulator source https://github.com/lgblgblgb/xemu/blob/master/xemu/f018_core.c
|
||||
|
||||
|
||||
// Registers of the MEGA65 enchanced F018 DMAgic Controller
|
||||
struct F018_DMAGIC {
|
||||
// $D700 ADDRLSBTRIG DMAgic DMA list address LSB, and trigger DMA (when written).
|
||||
@ -39,7 +38,6 @@ struct F018_DMAGIC {
|
||||
char MISC;
|
||||
};
|
||||
|
||||
|
||||
// F018A DMA list entry
|
||||
struct DMA_LIST_F018A {
|
||||
// DMA command
|
||||
|
@ -4,6 +4,8 @@
|
||||
#include <mega65.h>
|
||||
|
||||
void main() {
|
||||
// Map memory to BANK 0 : 0x00XXXX - giving access to I/O
|
||||
memoryRemap(0,0,0);
|
||||
// Enable enable F018B mode
|
||||
DMA->EN018B = 1;
|
||||
// Set address of DMA list
|
||||
@ -12,6 +14,8 @@ void main() {
|
||||
DMA-> ADDRMSB = >&DMA_SCREEN_UP;
|
||||
// Trigger the DMA (without option lists)
|
||||
DMA-> ADDRLSBTRIG = <&DMA_SCREEN_UP;
|
||||
// Re-enable F018A mode
|
||||
DMA->EN018B = 0;
|
||||
}
|
||||
|
||||
// DMA list entry that scrolls the default screen up
|
||||
|
Loading…
Reference in New Issue
Block a user