Welcome, Guest. Please login or register.

Author Topic: Need help again, hehe, this time in asm  (Read 3477 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show all replies
    • http://www.iki.fi/sintonen/
Re: Need help again, hehe, this time in asm
« on: May 10, 2004, 02:56:25 PM »
Code: [Select]

        SECTION DATA_C,DATA_C
copper: dc.w ...
        dc.w $ffff,$fffe
        dc.w $ffff,$fffe

Or alternatively AllocMem MEMF_CHIP memory and build the copperlist into this memory.
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show all replies
    • http://www.iki.fi/sintonen/
Re: Need help again, hehe, this time in asm
« Reply #1 on: May 11, 2004, 03:18:01 PM »
Some comments...

Quote
Code: [Select]

    move.l dosbase,a0
    move.l -30(a0),oldcop ;I think it was -30

That's wrong. DOSBase - 30 is ptr to jump to _LVOOpen routine, not old copper list. You only find JMP (abs).l instruction there on 2.x+ or 'moveq #x,d0 + bra.w' with 1.x.

This means the code is unable to restore system copper list at exit.

Quote
Code: [Select]

loadsys:

move olddma,$dff096

You need to disable all DMA before restoring:
Code: [Select]

loadsys:

move.w #$7fff,$dff096
move.w olddma,$dff096

Also, the code lacks disabling of interrupts (INTENA(R)) before peeking & poking DMACON(R).

In fact, you probably want to take a look at proper minimal startup code hwstartup.asm.