reformatted assembler code
This commit is contained in:
@@ -67,4 +67,5 @@ end
|
||||
|
||||
tr
|
||||
ib
|
||||
add-symbol-file ../emutos/emutos2.img 0xe00000
|
||||
load firebee/ram.elf
|
||||
|
||||
@@ -126,8 +126,9 @@
|
||||
// Atari register equates (provided by FPGA)
|
||||
.equ vbasehi, 0xffff8201
|
||||
|
||||
//mmu ---------------------------------------------------
|
||||
/* Register read/write macros */
|
||||
|
||||
/* MMU register read/write macros */
|
||||
|
||||
#define MCF_MMU_MMUCR __MMUBAR
|
||||
#define MCF_MMU_MMUOR __MMUBAR+0x04
|
||||
#define MCF_MMU_MMUSR __MMUBAR+0x08
|
||||
@@ -308,6 +309,8 @@ init_vec_loop:
|
||||
|
||||
move.l (sp)+,a2 // Restore registers
|
||||
rts
|
||||
|
||||
|
||||
/*
|
||||
* exception vector routines
|
||||
*/
|
||||
@@ -524,7 +527,7 @@ irq6_os: // call native OS irq6 handler
|
||||
move.w #0x2600,sr // set interrupt mask
|
||||
rts
|
||||
|
||||
#ifdef _NOT_USED_
|
||||
#ifdef _NOT_USED_ /* functionality moved to _irq6_interrupt_handler() (C) */
|
||||
subq.l #8,a7
|
||||
movem.l d0/a5,(a7) // save registers
|
||||
|
||||
@@ -585,46 +588,6 @@ irq6_sca_pn1c:
|
||||
move.l d3,a1
|
||||
move.l #0x10000,d4 // one whole page (1 MB)
|
||||
|
||||
#define _DO_CPU_COPY
|
||||
#ifndef _DO_CPU_COPY
|
||||
|
||||
// experiment: do video page copy using Coldfire DMA
|
||||
|
||||
lea -15 * 4(sp),sp
|
||||
movem.l d0-d1/a0-a1,(sp) // save gcc scratch registers
|
||||
clr.l -(sp) // no special functions
|
||||
move.l #MCD_SINGLE_DMA|MCD_TT_FLAGS_CW|MCD_TT_FLAGS_RL|MCD_TT_FLAGS_SP,-(sp)
|
||||
mov3q #7,-(sp) // highest DMA priority
|
||||
move.l #DMA_ALWAYS,-(sp) // do memory to memory DMA
|
||||
move.l #1,-(sp) // copy 4 bytes at a time
|
||||
move.l #0x100000,-(sp) // copy 1 Megabyte
|
||||
move.l #4,-(sp) // destination increment
|
||||
move.l a1,-(sp) // destination adress
|
||||
move.l #4,-(sp) // source increment
|
||||
move.l a0,-(sp) // source adress
|
||||
move.l #1,-(sp) // channel 1
|
||||
jsr _MCD_startDma
|
||||
|
||||
movem.l (sp),d0-d1/a0-a1 // restore gcc scratch registers
|
||||
lea 15 * 4(sp),sp // adjust stack
|
||||
|
||||
wait_dma_finished:
|
||||
clr.l -(sp)
|
||||
jsr _MCD_dmaStatus
|
||||
addq.l #4,sp
|
||||
tst.l d0
|
||||
cmp.l #6,d0
|
||||
bne wait_dma_finished
|
||||
#else
|
||||
irq6_vcd0_loop:
|
||||
move.l (a0)+,(a1)+ // page copy
|
||||
move.l (a0)+,(a1)+
|
||||
move.l (a0)+,(a1)+
|
||||
move.l (a0)+,(a1)+
|
||||
subq.l #1,d4
|
||||
bne irq6_vcd0_loop
|
||||
#endif /* _DO_CPU_COPY */
|
||||
|
||||
irq6_sca_pn:
|
||||
add.l #0x00100000,d3 // next
|
||||
cmp.l #0x00d00000,d3 // ende?
|
||||
@@ -744,6 +707,7 @@ acsi_dma_end:
|
||||
rts
|
||||
|
||||
#endif /* _NOT_USED_ */
|
||||
|
||||
/*
|
||||
* irq 7 = pseudo bus error
|
||||
*/
|
||||
@@ -800,7 +764,7 @@ handler_gpt0:
|
||||
blt video_chg_end // yes, do nothing
|
||||
cmp.w #0xd0,d0 // lower than 0xd00000? - normal Falcon video area, mapped
|
||||
// to 60d00000 (FPGA video memory)
|
||||
blt sca_other //
|
||||
blt sca_other
|
||||
|
||||
lea MCF_SLT0_SCNT,a0
|
||||
move.l (a0),_video_sbt // save time
|
||||
@@ -834,40 +798,6 @@ video_copy_data:
|
||||
add.l #0x60000000,a1
|
||||
move.l #0x10000,d4 // whole page
|
||||
|
||||
#define _DO_CPU_COPY
|
||||
#ifndef _DO_CPU_COPY
|
||||
|
||||
// experiment: do video page copy using Coldfire DMA
|
||||
|
||||
lea -4 * 4(sp),sp
|
||||
movem.l d0-d1/a0-a1,(sp) // save gcc scratch registers
|
||||
|
||||
clr.l -(sp) // no special functions
|
||||
move.l #MCD_SINGLE_DMA|MCD_TT_FLAGS_CW|MCD_TT_FLAGS_RL|MCD_TT_FLAGS_SP,-(sp)
|
||||
mov3q #7,-(sp) // highest DMA priority
|
||||
move.l #DMA_ALWAYS,-(sp) // do memory to memory DMA
|
||||
move.l #1,-(sp) // copy 4 bytes at a time
|
||||
move.l #0x100000,-(sp) // copy 1 Megabyte
|
||||
move.l #4,-(sp) // destination increment
|
||||
move.l a1,-(sp) // destination adress
|
||||
move.l #4,-(sp) // source increment
|
||||
move.l a0,-(sp) // source adress
|
||||
move.l #1,-(sp) // channel 1
|
||||
jsr _MCD_startDma
|
||||
|
||||
.wait_dma_finished:
|
||||
clr.l -(sp)
|
||||
jsr _MCD_dmaStatus
|
||||
addq.l #4,sp
|
||||
tst.l d0
|
||||
cmp.l #6,d0
|
||||
bne .wait_dma_finished
|
||||
|
||||
movem.l (sp),d0-d1/a0-a1 // restore gcc scratch registers
|
||||
lea 4 * 4(sp),sp // adjust stack
|
||||
|
||||
#else
|
||||
|
||||
video_copy_data_loop:
|
||||
move.l (a0)+,(a1)+ // copy video page contents to real screen
|
||||
move.l (a0)+,(a1)+
|
||||
@@ -875,7 +805,6 @@ video_copy_data_loop:
|
||||
move.l (a0)+,(a1)+
|
||||
subq.l #1,d4
|
||||
bne video_copy_data_loop
|
||||
#endif
|
||||
|
||||
// eintrag suchen
|
||||
move.l d0,MCF_MMU_MMUAR // adress
|
||||
@@ -944,5 +873,3 @@ _lowlevel_isr_handler:
|
||||
movem.l (sp),d0-d1/a0-a1 // restore registers
|
||||
unlk a6 // cleanup stack
|
||||
rte
|
||||
|
||||
// vim: set syntax=asm68k :
|
||||
|
||||
@@ -335,13 +335,14 @@ void video_addr_timeout(void)
|
||||
video_sbt = 0;
|
||||
}
|
||||
|
||||
static uint32_t blinker = 0;
|
||||
|
||||
/*
|
||||
* blink the Firebee's LED to show we are still alive
|
||||
*/
|
||||
void blink_led(void)
|
||||
{
|
||||
static uint16_t blinker = 0;
|
||||
|
||||
if ((blinker++ & 0x80) > 0)
|
||||
{
|
||||
MCF_GPIO_PODR_FEC1L |= (1 << 4); /* LED off */
|
||||
@@ -380,7 +381,7 @@ bool irq6_interrupt_handler(uint32_t sf1, uint32_t sf2)
|
||||
{
|
||||
bool handled = false;
|
||||
|
||||
MCF_EPORT_EPFR &= (1 << 6); /* clear int6 from edge port */
|
||||
MCF_EPORT_EPFR |= (1 << 6); /* clear int6 from edge port */
|
||||
|
||||
if (video_sbt != 0 && (video_sbt - 0x70000000) > MCF_SLT0_SCNT)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user