AmigaPorts / AmigaPorts/ACE

Things pointed out by Asman

Ouverte
#76 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
bug enhancement
Langage dominant
C
Étoiles
223
Forks
38
Merge moyen
1 j 5 h
PR mergées (30 j)
6

Description

- [x] Interrupt flag should be cleared two times for faster machines.
- [x] Add OsFlush functionality after rewriting it to C
- [x] before resetting display, one should take over blitter - it helps circumvent "copjmp nasty bug", whatever that is
- [ ] Right now interrupts are disabled, then fn waits for end of frame and disables DMA. Something should be done to prevent copper re-enabling interrupts

When disabling DMA/INT stuff, Asman does the following:

``` asm
move.w #$7fff,d0
move.w d0,dmacon(a5) ;dma off
move.w d0,intena(a5) ;disable ints
move.w d0,intreq(a5) ;clear pending ints
```

OsFlush from [EAB](http://eab.abime.net/showthread.php?t=92911):

``` asm
;-----------------------------------------------------------------------------
;
;; OsFlush
;
;in a4 - dt
;out -
;used d0/d1/d2/d3/a0/a1/a2/a4
;
xdef OsFlush
OsFlush:
move.l 4.w,a6
moveq #72,d0
moveq #1,d1
swap d1
jsr -198(a6) ;exec AllocMem(d0 - size, d1 - attr)
move.l d0,d2
beq.b .exit
move.l d0,a0
move.l a0,d1 ;device name
move.l #'sys:',(a0)

;get our message port
move.l 276(a6),a2 ;ThisTask
lea 92(a2),a2 ;pr_MsgPort

;get filesystem message port
move.l osDosBase(a4),a6
jsr -174(a6) ;dos DeviceProc(d1 - name)
move.l d0,d3
beq.b .free

;fill in packet
move.l d2,a1
addq.l #4,a1 ;message
lea 20(a1),a0 ;dos packet

move.l a0,10(a1) ;message->mn_Node.ln_Name = dospacket
move.l a2,14(a1) ;mn_ReplyPort = pr_MsgPort

move.l a1,(a0)+ ;dp_link = message
move.l a2,(a0)+ ;dp_Port = pr_MsgPort
moveq #27,d0
move.l d0,(a0) ;dp_Type = ACTION_FLUSH

;sends packet
move.l 4.w,a6
move.l d3,a0
jsr -$16e(a6) ;exec PutMsg(a0 - port,a1 - msg)

;wait for reply
move.l a2,a0
jsr -$180(a6) ;exec WaitPort(a0 - port)
move.l a2,a0
jsr -$174(a6) ;exec GetMsg(a0 - port)
.free
move.l d2,a1
moveq #72,d0
jsr -210(a6) ;exec FreeMem(a1 - mem, d0 - size)

.exit rts

;-----------------------------------------------------------------------------
```

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.