31 May 2017, 22:29 | #1 |
Registered User
Join Date: Apr 2016
Location: Perth, Australia
Posts: 397
|
Problem getting demo starter code to work
Hello all,
I am using Photon's demo starter code to handle all the boring initialisation for a demo available here: http://coppershade.org/asmskool/SOUR...pershade-DDE1/ The problem is when I click the mouse to return to the system I am just greeted with a black screen. I have narrowed it down to the vertical blank interrupt causing the issue but I have no idea why. For now I have just had to comment out the line assigning the new VBlank. I am using an A1200 with a 68030 CPU if that helps |
31 May 2017, 22:56 | #2 |
Going nowhere
Join Date: Oct 2001
Location: United Kingdom
Age: 50
Posts: 9,016
|
Which file? Ministartup?
|
31 May 2017, 23:12 | #3 |
Registered User
Join Date: Apr 2016
Location: Perth, Australia
Posts: 397
|
technically both since ministartup has an include for the wrapper file
|
01 June 2017, 16:51 | #4 |
Registered User
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,436
|
I did have a similar problem with the mini startup myself, though not with the interrupt section. The WaitEOF/WaitRaster routines didn't always work for me and could end up hanging the system.
Now I don't know if your problem is related to this, but mine was solved by replacing the WaitEOF routine with the following code: Code:
WaitEOF bsr.s WaitBlitter .wvbl btst #0,(custombase+vposr+1) beq .wvbl .iloop btst #0,(custombase+vposr+1) bne .iloop rts |
01 June 2017, 18:33 | #5 |
Registered User
Join Date: Apr 2016
Location: Perth, Australia
Posts: 397
|
That did indeed fix it although my demo's frame rate became jerky when it was running super smooth before.
I changed it back to the original routine and the frame rate is smooth again but the exit problem returns. Interestingly, I put sprites in my demo and when I exit the demo the background is all black but the sprites are still displayed on the screen but they are frozen. Last edited by Nightfox; 01 June 2017 at 18:50. |
01 June 2017, 23:24 | #6 |
Registered User
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,436
|
It could be because the code I posted waits for rasterline 0 and the code that Photon used waits for a high number instead. That might be enough to cause jerkyness, especially if you use both WaitEOF and a VBlank interrupt, this can cause the wait to miss its rasterline and wait a full extra frame.
You could try adapting my WaitVPos routine for your purpose. That lets you pick a rasterline. Code:
; Routine WaitVPos ; This routine waits on a specified vertical raster position ; ; D6: Scanline to wait on (0 = top of visible screen (line 44)) ; ; Returns: ; D6: Undefined ; D7: Undefined WaitVPos add.w #44,d6 asl.l #8,d6 .waitvpos move.l custombase+vposr,d7 and.l #$1ff00,d7 cmp.l d6,d7 bne.b .waitvpos .iloop move.l custombase+vposr,d7 and.l #$1ff00,d7 cmp.l d6,d7 bne.b .iloop rts |
23 July 2017, 23:00 | #7 | ||
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,655
|
Quote:
Quote:
Effects and startup code should certainly work on all PAL Amigas. WaitEOF: A wait for scanline $138 would just as certainly hang all NTSC Amigas, make all WaitRaster calls use $105 or less and adapt the Copper list. Anything else is too much speculation without more information on environment and whether the source is unmodified. Last edited by Photon; 23 July 2017 at 23:06. |
||
23 July 2017, 23:36 | #8 |
Registered User
Join Date: Apr 2016
Location: Perth, Australia
Posts: 397
|
Photon do you know why your starter code does not return me to the OS correctly and requires a reboot?
|
23 July 2017, 23:47 | #9 | |||
Registered User
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,436
|
Quote:
Quote:
Quote:
This happens for me on both real PAL A500's and WinUAE A500 cycle exact setting. I have no idea why though |
|||
24 July 2017, 13:48 | #10 |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,655
|
Nightfox: A good startup should definitely return you safely to the OS!
If the files in your link doesn't let you do that, they could have an error or there's something about how you run it. I can't reproduce it. It would be interesting to find the cause. To eliminate variables, can you assemble PhotonsMiniStartup1.04!.S (unmodified) to an object file (executable) and run the exe? This will tell us if it's something in the Assembler or outside. If it works, you can do the same with DDE-Plot1.S and then your demo. |
24 July 2017, 20:53 | #11 |
Registered User
Join Date: Apr 2016
Location: Perth, Australia
Posts: 397
|
I was using your unmodified files. I am using an A1200 with 030 accelerator using AmigaOS3.9. Not sure if that makes things too complicated to diagnose
|
24 July 2017, 21:19 | #12 |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,655
|
OK, no, it's not too complex. But part of the diagnostics is that you have to do these steps on your machine since it works here.
|
24 July 2017, 22:13 | #13 |
Registered User
Join Date: Apr 2016
Location: Perth, Australia
Posts: 397
|
This is your unmodified starter code
[ Show youtube player ]
|
25 July 2017, 09:44 | #14 |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,655
|
And here are some unmodified Assemblers.
[ Show youtube player ]
My sources are very tested and clearly commented. There could still be something that doesn't play nice with your environment. If you want to find it you must do like I asked on your machine, with just one environment removed (the Assembler). --> A, WO, run exe. Does it work? The reason for AsmPro causing the Copper to roll is especially juicy and one reason why these things are not obvious. |
25 July 2017, 20:43 | #15 |
Registered User
Join Date: Apr 2016
Location: Perth, Australia
Posts: 397
|
hmm. Writing the object file then executing it outside the assembler works. I guess Asm-One 1.48 is misbehaving somehow. Thanks Photon, you rock my socks off. I wonder if there's a way of fixing this
|
25 July 2017, 22:23 | #16 |
Registered User
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,436
|
I've tested the startup as well using VASM for cross-assembling and unmodified, it does indeed work.
Makes me wonder why I managed to get it to crash on exit, while the change I did somehow fixed it. One thing I'm wondering about is: I'm assuming this also works outside of the display window, mine was a bit smaller than standard. Could that mean I need to change the raster line I wait on? That would feel very odd to me, as the beam surely does travel to the lines outside of the display window. Other than that though, I'm not sure what causes the difference. I remember testing this with a pretty much empty frame loop because I thought the problem was with my code. It's quite possible that is indeed true, but I'm not sure what is wrong then. |
25 July 2017, 22:47 | #17 | ||
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,655
|
Quote:
Even though Asm-One 1.48 and AsmPro seem buggy under 68000 in the short video, I wouldn't conclude that they don't work - maybe a setting or a 68020+ library causes it. Quote:
Last edited by Photon; 25 July 2017 at 22:58. |
||
25 July 2017, 23:07 | #18 |
Registered User
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,436
|
Well, I'll see if I can find what exactly breaks it. If I do, I'll report back to this thread, but frankly don't count on that happening too soon - as I have no idea
|
25 July 2017, 23:16 | #19 |
Registered User
Join Date: Apr 2016
Location: Perth, Australia
Posts: 397
|
My settings were the same as yours except I don't have RTG mode enabled because the text output is buggy with it turned on. But I tried turning it on anyway and the same thing happened. I also just tried Asm-One 1.49 beta and it has the same problem
|
26 July 2017, 08:58 | #20 |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
|
It must be a problem on your end, I've tested the code with ASM-One 1.48 and ASM-Pro and there were no problems.
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Can anyone work with the code from this game...? | Peter | Coders. General | 3 | 09 November 2009 16:19 |
WinUAE: Sumea Demo doesn't work properly | Leonid | support.WinUAE | 7 | 06 May 2008 20:33 |
Rocket ranger code wheel won't work | paul9090 | support.Games | 32 | 18 February 2002 23:30 |
Can anyone make this demo work? | Ziaxx | support.Demos | 20 | 02 January 2002 21:03 |
|
|