English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 21 May 2021, 23:11   #1
DaveInFL
Registered User
 
Join Date: Apr 2021
Location: Florida
Posts: 48
Copper Demo Issue

Still all very new to this so please bear with me.

So I entered the copper demo from the ASPG and when I run it from ASM-One it works fine.

I've also been following @mcgeezer and his video tutorials, of which the first was setting up an environment which allows to edit in a more modern IDE (I am using Atom) and to use vasmm68k_mot to compile the assembler source and create an exe file that can then be executed from WB.

I initially tried this with the ASPG's 2 bitplane scroll demo and it worked fine. But for some reason when I try this of the copper demo it does not display the 3 colours at all, it just shows the WB screen. I can see the program is working as I have to click the mouse button to exit. So, what's going on and why won't it work except from ASM-One?

Here's the command I am using to create the .exe file.

./vasmm68k_mot -m68020 -kick1hunks -Fhunkexe -o ~/Documents/EMUs/Amiga/Utils/Classic-WB/PC/code/${filenoext}.exe ./${filename}
Attached Files
File Type: s CopperExample.S (2.4 KB, 90 views)
DaveInFL is offline  
Old 21 May 2021, 23:56   #2
kamelito
Zone Friend
 
kamelito's Avatar
 
Join Date: May 2006
Location: France
Posts: 1,801
I guess it is a different problem than the one you get there ? http://eab.abime.net/showthread.php?...highlight=Aspg
kamelito is offline  
Old 22 May 2021, 00:30   #3
DaveInFL
Registered User
 
Join Date: Apr 2021
Location: Florida
Posts: 48
Quote:
Originally Posted by kamelito View Post
I guess it is a different problem than the one you get there ? http://eab.abime.net/showthread.php?...highlight=Aspg
Well, good point, and maybe not. I am running the .exe file from Classic-WB using an A1200 emulation. There's no graphics card selected but perhaps the Classic-WB 3.1 is not a native screen mode? Maybe that is why?
DaveInFL is offline  
Old 22 May 2021, 00:55   #4
DaveInFL
Registered User
 
Join Date: Apr 2021
Location: Florida
Posts: 48
Ok, so after doing some testing it definitely has something to do with the Classic-WB 3.1 install. What though I have no idea.

Guess I need to do a straight, clean WB3.1 install to test these assembler programs out on.
DaveInFL is offline  
Old 24 May 2021, 18:04   #5
DaveInFL
Registered User
 
Join Date: Apr 2021
Location: Florida
Posts: 48
Since it is probably down to the screen mode, what is the assembler call to set the screen mode to (for example) Pal 320x256 or 640x256 so that the code contains the code to set the correct screen mode so that it runs no matter what.

Does setting the screen mode have something to do with DIWSTRT and DIWSTOP? Setting these to be 320x256 (I know it's not that simple) would result in setting the screen mode to what it needs to be so that the code runs, even if I run it from Classic-WB which has some pretty hi-res modes? Or is there some system call that can simply set the screen mode to one of the standard Amiga modes?

Last edited by DaveInFL; 24 May 2021 at 18:43.
DaveInFL is offline  
Old 24 May 2021, 18:48   #6
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
Quote:
Originally Posted by DaveInFL View Post
Since it is probably down to the screen mode, what is the assembler call to set the screen mode to (for example) Pal 320x256 or 640x256 so that the code contains the code to set the correct screen mode so that it runs no matter what.

You need to flush the view (graphics.library), for this you need to obtain the current view, clear it and then perform two WaitTOF() calls.

You can see how this is done in my startup code: https://github.com/MK1Roxxor/MiniSta...ster/startup.i
Relevant routine is ".DoView".

Last edited by StingRay; 24 May 2021 at 18:53. Reason: typo
StingRay is offline  
Old 24 May 2021, 20:39   #7
DaveInFL
Registered User
 
Join Date: Apr 2021
Location: Florida
Posts: 48
Quote:
Originally Posted by StingRay View Post
You need to flush the view (graphics.library), for this you need to obtain the current view, clear it and then perform two WaitTOF() calls.

You can see how this is done in my startup code: https://github.com/MK1Roxxor/MiniSta...ster/startup.i
Relevant routine is ".DoView".
Appreciate that, but at the level I am at (super beginner) that is way above my head.
DaveInFL is offline  
Old 24 May 2021, 20:47   #8
roondar
Registered User
 
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,406
A way to fix most of this is to use available startup code made by expert developers. There's a number of these startup routines available. StingRay offered his, which undoubtedly works very well. Personally, I use the startup code by Photon (it can be found here: http://coppershade.org/articles/More!/Downloads/ under "Photon's Ministartup.S"), which has worked really well for me.

There's some more options, but at any rate I'd recommend against making your own
roondar is offline  
Old 24 May 2021, 22:37   #9
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
Quote:
Originally Posted by DaveInFL View Post
There's no graphics card selected but perhaps the Classic-WB 3.1 is not a native screen mode? Maybe that is why?
No. The main reason is that you turn off Raster, Copper and Sprite-DMA and load your copper list without reenabling Copper-DMA after that. I would recommend at least
move.w #$8280,DMACON(a5)
after setting COP1LC, besides loading a NULL-View followed by two WaitTOF(), as noted by others.

And please remove the
clr.w COPJMP1(a5)
line. The copper list pointer is loaded automatically from COP1LC when a new frame starts. So COPJMP1 has no effect, besides potentially triggering a chipset-bug when the Blitter is busy at the same time.

Also never use CLR on chipset registers (I/O registers in general), if you want your code to run on 68000 without side effects (read/modify/write cycle, due to 68000 bug).
phx is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Combining copper scrolling with copper background phx Coders. Asm / Hardware 16 13 February 2021 12:41
Best way to mix blitting with copper and copper effects roondar Coders. Asm / Hardware 3 12 September 2016 13:12
Problem running copper master demo on A1200 whitebird support.Demos 26 17 August 2014 17:41
Full screen 'copper' flashing Jesus On-e' Demo only after v1.6+ prof72 support.WinUAE 5 10 August 2010 17:05
Wild Copper WB demo oRBIT request.Demos 2 05 March 2009 15:00

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 01:54.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.10368 seconds with 16 queries