fixed and completed comments
This commit is contained in:
@@ -538,8 +538,10 @@ irq7: // irq7 is tied to PCI INTA# and PCI INTB# on the M5484LITE
|
|||||||
rte // return from exception
|
rte // return from exception
|
||||||
|
|
||||||
irq7text:
|
irq7text:
|
||||||
|
.data
|
||||||
.ascii "IRQ7!"
|
.ascii "IRQ7!"
|
||||||
.dc.b 13,10,0
|
.dc.b 13,10,0
|
||||||
|
.text
|
||||||
|
|
||||||
#elif MACHINE_FIREBEE /* these handlers are only meaningful for the Firebee */
|
#elif MACHINE_FIREBEE /* these handlers are only meaningful for the Firebee */
|
||||||
irq5: // irq5 is tied to PCI INTC# and PCI INTD# on the M5484LITE
|
irq5: // irq5 is tied to PCI INTC# and PCI INTD# on the M5484LITE
|
||||||
@@ -769,7 +771,6 @@ handler_gpt0:
|
|||||||
|
|
||||||
lea -7 * 4(sp),sp // save registers
|
lea -7 * 4(sp),sp // save registers
|
||||||
movem.l d0-d4/a0-a1,(sp)
|
movem.l d0-d4/a0-a1,(sp)
|
||||||
|
|
||||||
mvz.b vbasehi,d0 // screen base address high
|
mvz.b vbasehi,d0 // screen base address high
|
||||||
cmp.w #2,d0 // screen base lower than 0x20000?
|
cmp.w #2,d0 // screen base lower than 0x20000?
|
||||||
blt video_chg_end // yes, do nothing
|
blt video_chg_end // yes, do nothing
|
||||||
@@ -788,15 +789,14 @@ sca_other:
|
|||||||
move.b 0xffff8203,d0 // mid byte
|
move.b 0xffff8203,d0 // mid byte
|
||||||
lsl.l #8,d0
|
lsl.l #8,d0
|
||||||
move.b 0xffff820d,d0 // low byte
|
move.b 0xffff820d,d0 // low byte
|
||||||
move.l d0,d3
|
move.l d0,d3 // d0 and d3 now contain the video memory start address
|
||||||
|
|
||||||
video_chg_1page:
|
video_chg_1page:
|
||||||
// check if page is already marked as video page
|
|
||||||
moveq #20,d4
|
moveq #20,d4
|
||||||
move.l d0,d2
|
move.l d0,d2
|
||||||
lsr.l d4,d2 // new page
|
lsr.l d4,d2 // shift right by 20 bit -> page number (MB pages)
|
||||||
move.l _video_tlb,d4
|
move.l _video_tlb,d4 // save to video pages bitmask
|
||||||
bset.l d2,d4 // set as changed
|
bset.l d2,d4 // set as newly set
|
||||||
bne video_chg_2page // was it set already?
|
bne video_chg_2page // was it set already?
|
||||||
move.l d4,_video_tlb
|
move.l d4,_video_tlb
|
||||||
// jsr _flush_and_invalidate_caches FIXME: why should we need that?
|
// jsr _flush_and_invalidate_caches FIXME: why should we need that?
|
||||||
@@ -807,10 +807,10 @@ video_copy_data:
|
|||||||
move.l d0,a0
|
move.l d0,a0
|
||||||
move.l a0,a1
|
move.l a0,a1
|
||||||
add.l #0x60000000,a1
|
add.l #0x60000000,a1
|
||||||
move.l #0x10000,d4 // whole page
|
move.l #0x10000,d4 // 16 bytes per copy -> 1 MB
|
||||||
|
|
||||||
video_copy_data_loop:
|
video_copy_data_loop:
|
||||||
move.l (a0)+,(a1)+ // copy video page contents to real screen
|
move.l (a0)+,(a1)+ // copy video page contents to FPGA memory
|
||||||
move.l (a0)+,(a1)+
|
move.l (a0)+,(a1)+
|
||||||
move.l (a0)+,(a1)+
|
move.l (a0)+,(a1)+
|
||||||
move.l (a0)+,(a1)+
|
move.l (a0)+,(a1)+
|
||||||
@@ -834,33 +834,33 @@ video_copy_data_loop:
|
|||||||
move.l d1,MCF_MMU_MMUDR
|
move.l d1,MCF_MMU_MMUDR
|
||||||
move.l d2,MCF_MMU_MMUOR // setzen vidoe maped to 60xxx only data
|
move.l d2,MCF_MMU_MMUOR // setzen vidoe maped to 60xxx only data
|
||||||
nop
|
nop
|
||||||
|
|
||||||
video_chg_2page:
|
video_chg_2page:
|
||||||
// test of adjacent page is needed also
|
// calculate screen memory size
|
||||||
move.l d3,d0
|
move.l d3,d0
|
||||||
mvz.w 0xffff8210,d4 // VWRAP: words per scanline
|
mvz.w 0xffff8210,d4 // VWRAP: words per scanline
|
||||||
mvz.w 0xffff82aa,d2 // VDE: vertical display end
|
mvz.w 0xffff82aa,d2 // VDE: vertical display end
|
||||||
mvz.w 0xffff82a8,d1 // VDB: vertical display begin
|
mvz.w 0xffff82a8,d1 // VDB: vertical display begin
|
||||||
sub.l d1,d2 // number of lines
|
sub.l d1,d2 // number of lines
|
||||||
mulu d2,d4 // times number of words per line
|
mulu d2,d4 // times number of words per line
|
||||||
add.l d4,d0 // video memory end address
|
add.l d4,d0 // calculate end address
|
||||||
cmp.l #__STRAM_END,d0 // start address > end of STRAM?
|
cmp.l #__STRAM_END,d0 // > end of STRAM?
|
||||||
bge video_chg_end // yes - we're finished
|
bge video_chg_end // yes - we're finished
|
||||||
|
moveq #20,d4 // shift right by 20 bit -> page number (MB pages)
|
||||||
moveq #20,d4
|
|
||||||
move.l d0,d2
|
move.l d0,d2
|
||||||
lsr.l d4,d2 // neue page
|
lsr.l d4,d2 // calculate page number
|
||||||
move.l _video_tlb,d4
|
move.l _video_tlb,d4
|
||||||
bset.l d2,d4 // setzen als ge<EFBFBD>ndert
|
bset.l d2,d4 // set as changed
|
||||||
beq video_copy_data // nein nochmal
|
beq video_copy_data // was not set yet, copy
|
||||||
|
|
||||||
jsr _flush_and_invalidate_caches
|
jsr _flush_and_invalidate_caches
|
||||||
|
|
||||||
video_chg_end:
|
video_chg_end:
|
||||||
lea MCF_GPT0_GMS,a0 // disable and reenable timer
|
lea MCF_GPT0_GMS,a0 // disable and reenable trigger
|
||||||
bclr.b #0,3(a0) // input capture
|
bclr.b #0,3(a0)
|
||||||
nop
|
nop
|
||||||
bset.b #0,3(a0)
|
bset.b #0,3(a0)
|
||||||
|
movem.l (sp),d0-d4/a0-a1 // restore saved registers
|
||||||
movem.l (a7),d0-d4/a0-a1 // restore saved registers
|
|
||||||
lea 7 * 4(sp),a7
|
lea 7 * 4(sp),a7
|
||||||
rte
|
rte
|
||||||
#endif /* MACHINE_FIREBEE */
|
#endif /* MACHINE_FIREBEE */
|
||||||
|
|||||||
Reference in New Issue
Block a user