11 August 2020, 13:14 | #1 |
Prototron
Join Date: Mar 2015
Location: Glasgow, Scotland
Posts: 411
|
** LineF Emulator ** Raised at $00020152
Hi folks. I've been working my way through Photon Of Scoopex ASM course on YouTube, and I'm really enjoying it, but I've hit a snag.
I'm on lesson 7, and I keep getting this error message whenever I try to run the program. As you can see there's some graphical corruption as well. I've been through the entire code line by line about three times, and I can't see anything wrong. I even downloaded the sources from the Coppershade site and again went through line by line, but it's Identical, yet I keep getting this error. I'm kind of stuck here as I can't go any further, so I'd appreciate some help. I'm using the latest WinUAE buid on 64-Bit Windows 7 PC. |
11 August 2020, 14:01 | #2 | |
Going nowhere
Join Date: Oct 2001
Location: United Kingdom
Age: 50
Posts: 9,004
|
Quote:
|
|
11 August 2020, 14:15 | #3 |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
|
Yes, upload the source somewhere as otherwise it's hard to say what causes your problem, can be uninitialised pointers/interrupts or something completely different.
|
11 August 2020, 14:15 | #4 | |
Prototron
Join Date: Mar 2015
Location: Glasgow, Scotland
Posts: 411
|
Quote:
Code:
ORG $20000 LOAD $20000 JUMPPTR init init: move.l 4.w,a6 ;execbase clr.l d0 move.l #gfxname,a1 jsr -408(a6) ;oldopenlibrary() move.l d0,a1 move.l 38(a1),d4 ;original copper ptr jsr -414(a6) ;closelibrary() move.w #$ac,d7 ;start y position moveq #1,d6 ;y add move.w $dff01c,d5 ; Read bits and store in d5 move.w #$7fff,$dff09a ; disable interrupts (disable all bits in INTENA) move.l #copper,$dff080 : Call copperlist to cppr first register ************************** mainloop: wframe: btst #0,$dff005 bne.b wframe cmp.b #$2a,$dff006 bne.b wframe wframe2: cmp.b #$2a,$dff006 beq.b wframe2 ;-----frame loop start-----; add d6,d7 ;add "1" to y position cmp #$f0,d7 ;bottom check blo.b ok1 neg d6 ;change direction ok1: cmp.b #$40,d7 bhi.b ok2 neg d6 ;change direction ok2: move.b d7,#waitras1 move d7,d0 add #9,d0 move.b d0,waitras2 ;-----frame loop end-----; btst #6,$bfe001 bne.b mainloop ************************** exit: move.l d4,$dff080 or #$c000,d5 move d5,$dff09a rts gfxname: dc.b "graphics.library",0 EVEN Copper: dc.w $1fc,0 ;slow fetch mode, AGA compatibility dc.w $100,$0200 dc.w $180,$349 dc.w $2b07,$fffe dc.w $180,$56c dc.w $2c07,$fffe dc.w $180,$113 waitras1: dc.w $8007,$fffe dc.w $180,$fff waitras2: dc.w $8107,$fffe dc.w $180,$113 dc.w $ffdf,$fffe dc.w $2c07,$fffe dc.w $180,$56c dc.w $2d07,$fffe dc.w $180,$349 dc.w $ffff,$fffe |
|
11 August 2020, 14:26 | #5 | |
Going nowhere
Join Date: Oct 2001
Location: United Kingdom
Age: 50
Posts: 9,004
|
Quote:
what that does is relocate your code to address $20000, and make it so that the code executes from that memory address. Typically this is too low for system friendly stuff. So I would remove the ORG statement, remove the LOAD statement, remove the JMPPTR statement. In their place put SECTION Brick,CODE_c This tells ASMONE to only load and relocate the code in chip mem, see how you get on with that. |
|
11 August 2020, 14:51 | #6 | |
Prototron
Join Date: Mar 2015
Location: Glasgow, Scotland
Posts: 411
|
Quote:
It's not really my code, I'm just following what's in the YouTube tutorials, and this particular lesson was about using ORG/LOAD/JUMPPTR etc. I followed the code to the letter, and this error stuff started to happen for me. Using the SECTION does fix it, but I'm curious as to why it worked ok in the tutorial video and not on my system? EDIT: I just tried with the ORG and LOAD again but with a higher address and it worked. There must be stuff at that address on the configuration that I am using. |
|
11 August 2020, 14:56 | #7 | |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
|
Quote:
|
|
11 August 2020, 14:56 | #8 | |
Going nowhere
Join Date: Oct 2001
Location: United Kingdom
Age: 50
Posts: 9,004
|
Quote:
Using those ORG/LOAD/JMPPTR statements/methods is only really any good if the code you're writing has no intention of returning back to AmigaDOS afterwards. So if you were writing game code for instance, or a demo, then that would be OK, but typically, and especially as you want the program to exit and return, using those statements is really not the done thing. Always let the system sort it for you, and it'll correctly return used resources when you exit. If you were desperate to use those functions, then changing the value from $20000 to $50000 would probably be enough to experiment with, but again, its simply not advisable for stuff you want to exit and return from cleanly. |
|
11 August 2020, 15:28 | #9 |
Prototron
Join Date: Mar 2015
Location: Glasgow, Scotland
Posts: 411
|
Thanks for all the great advice everyone!
I changed it to £30000 and it works fine now. No graphical corruption either. TBH I'm only keeping it this way to follow the tutorial as the lesson is about memory management, so I think it's just to show what's available. I'm just learning at the moment, but a demo is really the goal (well, I have an idea for an EP as a demo, but we'll see). Regardless, it's really good to get this kind of advice early on, so I'll definitely keep it in mind. Anyway, I'm super enjoying learning 68k. It always seemed a bit beyond reach, but I'm really getting into it! |
11 August 2020, 15:46 | #10 | ||
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
|
On your machine/config but it can and will happily crash on someone else's machine.
Quote:
Quote:
|
||
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Gotek floppy emulator vs. HxC SD floppy emulator | c0dehunter | support.Hardware | 50 | 05 July 2016 09:49 |
USB HxC Floppy emulator and SD HxC Floppy Emulator by Lotharek on ext FDD | dirkies | Amiga scene | 1 | 03 April 2012 00:08 |
THE Emulator (BBC emulator) | xc8 | Retrogaming General Discussion | 2 | 27 April 2010 03:49 |
Frederic's Emulator inside and Emulator thread | Fred the Fop | Retrogaming General Discussion | 22 | 09 March 2006 07:31 |
Need Emulator | Unregistered | New to Emulation or Amiga scene | 9 | 21 August 2002 19:24 |
|
|