Skip to content

Commit 9e71193

Browse files
KamelitolovelessKamelito
andauthored
Fix non working demos using AddInterServer through Disable and removal of uncessary delay in Enable.s (#150)
Co-authored-by: Kamelito <kamelitoloveless@gmail.com>
1 parent 9474bbf commit 9e71193

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

arch/m68k-amiga/exec/enable.S

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright © 1995-2010, The AROS Development Team. All rights reserved.
2+
Copyright 1995-2010, The AROS Development Team. All rights reserved.
33
$Id$
44

55
Desc: Enable() - Allow interrupts to occur after Disable().
@@ -72,6 +72,4 @@ AROS_SLIB_ENTRY(Enable,Exec,21):
7272
subq.b #1,%a6@(IDNestCnt)
7373
bge.s 0f
7474
move.w #0xc000,0xdff09a
75-
tst.b 0xbfe001
76-
tst.b 0xbfe001
7775
0: rts

arch/m68k-amiga/timer/lowlevel.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright © 1995-2018, The AROS Development Team. All rights reserved.
2+
Copyright 1995-2018, The AROS Development Team. All rights reserved.
33
$Id$
44
55
Desc: CIA timer.device
@@ -264,7 +264,10 @@ AROS_INTH1(cia_vbint, struct TimerBase *, TimerBase)
264264
return 0;
265265
inc64(&TimerBase->tb_vb_count);
266266

267-
Disable();
267+
/* Disable(); */
268+
asm volatile ("move.w #0x4000,0xdff09a\n");
269+
/* Disable() / Enable() here interfere with demos using AddInterServer called from Disable() */
270+
/* replaced by disabling / enabling Interrupt using INTENA */
268271
ForeachNodeSafe(&TimerBase->tb_Lists[UNIT_VBLANK], tr, next) {
269272
if (cmp64(&TimerBase->tb_vb_count, &tr->tr_time)) {
270273
Remove((struct Node *)tr);
@@ -280,7 +283,8 @@ AROS_INTH1(cia_vbint, struct TimerBase *, TimerBase)
280283
if (IsListEmpty(&TimerBase->tb_Lists[UNIT_VBLANK])) {
281284
TimerBase->tb_vblank_on = FALSE;
282285
}
283-
Enable();
286+
/* Enable(); */
287+
asm volatile ("move.w #0xc000,0xdff09a\n");
284288

285289
return 0;
286290

0 commit comments

Comments
 (0)