![]() |
![]() |
#21 |
gone
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
|
Fixed it.
@ StingRay - you were right (no surprise!) that the problem came from the blitter clear routine. I did what you did and made a cpu loop to do the clearing and all the bars worked OK. However, the blitter clear routine code was OK too - to make it work with the blitter clear, all I had to do was do another bsr to the wait_blit routine after writing blitsize. So: Code:
lea bars+6(pc),a0 move.w #%0000000100000000,bltcon0(a6) move.w #%0000000000000000,bltcon1(a6) move.l a0,bltdpth(a6) move.w #6,bltdmod(a6) bsr.s .wait_blit move.w #lines<<6+1,bltsize(a6) Code:
lea bars+6(pc),a0 move.w #%0000000100000000,bltcon0(a6) move.w #%0000000000000000,bltcon1(a6) move.l a0,bltdpth(a6) move.w #6,bltdmod(a6) bsr.s .wait_blit move.w #lines<<6+1,bltsize(a6) bsr.s .wait_blit Edit: a fixed blitter clear version of the copperwave code is attached to my earlier post in case anyone wants it. |
![]() |
![]() |
#22 |
Used Register
Join Date: Nov 2008
Location: Headvillage / The Nethervoids
Age: 50
Posts: 103
|
Unfortunately, doesn't seem to work on my A500.
Assembled it using ASMOne V1.20. Had to make the following changes before it completely assembled: - remove Devpac assembler option opt o+ - Change move.l cop_int_address(pc),cop_int_vect.w to move.l cop_int_address(pc),cop_int_vect (ditch the .w) (twice in the code) - Change bsr.s get_val to bsr.s .get_val All I get it a big black nudda... ![]() I have a feeling this has to do with data not being in chipmem (spent last night figuring out why I didn't get a picture on screen... Allocating chip mem and copying bitmap data fixed the problem). Then again I could be totally wrong... ![]() Have to get back to work now (ahem), but if time permits I'll try to copy the data to chip and see if that works... Lars Edit: Did add that second BSR.s .wait_blit, made no difference |
![]() |
![]() |
#23 | ||
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,865
|
Quote:
move.l cop_int_address(pc),cop_int_vect.w to move.l cop_int_address(pc),(cop_int_vect).w which works fine in ASM-One. Quote:
|
||
![]() |
![]() |
#24 | |
gone
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
|
@ Vortex - thanks for trying to run it
![]() Like StingRay says, the code is already being forced into chipram by the section code_c directive. Again, like StingRay says, I think the other stuff you had problems with when assembling under AsmOne are to do with assembler syntax differences from Devpac. The problems you're getting running on an A500 setup are probably to do with my bad startup code and not doing things in a very system friendly way. Try running it under a UAE emulated A500+ or sit tight and if I get the time over the next few days I'll try to make a version that does the startup stuff in the right way that'll hopefully work for you. Quote:
![]() |
|
![]() |
![]() |
#25 |
Used Register
Join Date: Nov 2008
Location: Headvillage / The Nethervoids
Age: 50
Posts: 103
|
@Stingray. Right, totally missed that section code_c bit, and wouldn't have known it's for 'forcing' stuff into chip mem to begin with... Thanks!
What would be the preferred way of doing things? Using section code_c or allocating memory using AllocMem and copy data? Or really doesn't matter? @pmc. Don't have WIN UAE (don't even have a windows machine... ![]() ![]() |
![]() |
![]() |
#26 |
gone
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
|
@ Vortex. No windows machine, no emulators and doing all your coding on the real thing? That, my friend, is truly keeping it retro.
![]() |
![]() |
![]() |
#27 |
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
|
It does matter because the AmigaOS can do all the work for you if you use the section statement. Otherwise you have to allocate, copy, deallocate, maintain pointer to memory and all references to therein yourself, and you also end up with a higher memory usage.
|
![]() |
![]() |
#28 |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,865
|
I don't see how you end up with higher memory usage if you use AllocMem() instead of using BSS/DATA sections. Anyway, using sections is usually easier but if you want to have relocatable code using AllocMem is much easier. IMHO it doesn't really matter though. Both is fine.
|
![]() |
![]() |
#29 |
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
|
In this case and in the case of any data section you would, because you would allocate more memory to hold an additional copy of data that is already in memory.
|
![]() |
![]() |
#30 |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,865
|
In case of data that has to be copied from fast to chip that's of course true.
![]() ![]() |
![]() |
![]() |
#31 |
Used Register
Join Date: Nov 2008
Location: Headvillage / The Nethervoids
Age: 50
Posts: 103
|
Yes, I can see that. Let's say you have some code (1K) and an image (10K) in a single executable file. Load the file, which will ''eat' 11K of mem. The executable will then allocate 10K of chip mem, 'eating' another 10K for a total of 21K.
Using section code_c the whole file is always loaded into chip mem, so no need to copy any data, saving you 10K in the example above. I assume you can 'force' parts of of your code and data into chip or fast? If this is true, how does the OS know where to load the different parts? Is this done with these file hunks I've read about, or am I just making wild guesses here and should I shut up and get back to messing with copper bars... ![]() ![]() |
![]() |
![]() |
#32 | |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,865
|
Quote:
Yes, there are different types of hunks (bit 30=1 -> load to chipram) so AmigaDOS "knows" what to do. You don't really have to care about this though. |
|
![]() |
![]() |
#33 |
Used Register
Join Date: Nov 2008
Location: Headvillage / The Nethervoids
Age: 50
Posts: 103
|
Gentlemen, thanks for all the info!
![]() So far rediscovering the Amiga has been great fun. |
![]() |
![]() |
#34 |
gone
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
|
@ Vortex - Attached for you is an A500 friendly version of my copperwave routine.
![]() Using StingRay's mini startup code as a guide I've redone my own startup routine into what I hope is a bit closer to the way it should be done. When I tested the new routine on an emulated A500 it worked fine - instead of a blank screen like I was getting before, I saw the bars waving away like they should. Let me know if it works on the real thing and I hope you like it. ![]() Last edited by pmc; 27 May 2009 at 13:45. |
![]() |
![]() |
#35 |
Used Register
Join Date: Nov 2008
Location: Headvillage / The Nethervoids
Age: 50
Posts: 103
|
Hi pmc, it works like a charm!
![]() Thanks for the fix. Looking forward to your next piece. Already working on mine.. ![]() Cheers, Lars |
![]() |
![]() |
#36 | |
gone
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
|
No worries man, glad it's working for you.
Hopefully now that my startup is a bit better you shouldn't get anymore blank screens when I post more routines. ![]() Quote:
![]() |
|
![]() |
![]() |
#37 | |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,865
|
Quote:
![]() |
|
![]() |
![]() |
#38 |
gone
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
|
Thanks for letting me know StingRay.
![]() To be honest, I noticed that you were doing some trickery there with the VBR in your startup code but I didn't really understand what the VBR was / is and what your code was doing so I stayed on the cautious side and didn't replicate that across. I don't really like putting things in my own code unless I understand what they're doing in case I do something later that might conflict and end up with no clue why my code isn't working! Edit: Sorry to be a pain but one other quick thing - I noticed in your and other peoples startup code that you move #%01111111111111111 (#$7fff) to dmacon to shut off dma before you turn it back on again later. Whenever I move that value to dmacon in any of my startups things don't work properly. I always end up having to move #%0000010111111111 instead to turn off dma and get things working. Is it just that my (emulated) Amiga doesn't like me...? ![]() Last edited by pmc; 26 May 2009 at 15:57. Reason: Another question... |
![]() |
![]() |
#39 |
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
|
It's because you don't set bit 9 afterwards, the DMA master enable. The description in the hardware manual is a bit ambiguous and most people interpret it as a convenient bit that turns on all DMA at once, but the actual purpose is to permit all DMA.
Last edited by Leffmann; 26 May 2009 at 17:21. |
![]() |
![]() |
#40 |
gone
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
|
Ah, OK. I'd read the HRM in the way you'd described too - I thought that bit 9 was just an all on / all off option. Now you've explained it that makes more sense. Thanks Leffman.
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Remember Bars 'N' Pipes? | Mikey_C | Amiga scene | 19 | 04 January 2023 22:29 |
Combining copper scrolling with copper background | phx | Coders. Asm / Hardware | 16 | 13 February 2021 12:41 |
Bars & Pipes Professional | Ricebug | New to Emulation or Amiga scene | 0 | 08 February 2012 03:32 |
Dopus bars | frikilokooo | project.ClassicWB | 11 | 12 April 2008 17:10 |
Bars and Pipes | Frank | New to Emulation or Amiga scene | 2 | 01 March 2004 13:43 |
|
|