![]() |
|
|||||||
| Register | >> Amiga FAQ/Wiki << | Rules & Help | Members List / Moderators List | Search | Today's Posts | Mark Forums Read |
![]() |
|
|
Thread Tools |
|
|
#1 |
|
Registered User
Join Date: May 2010
Location: London, UK
Posts: 62
|
Menace tutorial AGA fix
Hi all
Tinkering with asm (writing a game - slowly) and making use of the startup/shutdown framework provided by the Menace tutorial all those years ago I wonder if anyone can explain what is required to fix the source code to work on AGA? Right now it runs fine when ECS or OCS is selected as the chipset, but AGA gives a corrupt screen. Whether the startup code provided by the tutorial is or isn't a good example of such code I don't know, but it would be good to know why it doesn't work and how to correct it. It should hopefully further understanding of the architecture which is quite overwhelming when coming from a z80 coding perspective ! Cheers |
|
|
|
|
|
#2 |
|
Retired Quartex Sysop
Join Date: Sep 2001
Location: Roman Verulamium
Age: 47
Posts: 1,441
|
One for Galahad methinks!!
![]()
__________________
The thoughts of Chairman Methanoid at http://methanoid.blogspot.com |
|
|
|
|
|
#3 |
|
Registered Insane
Join Date: Feb 2010
Location: Ununited Kingdom
Posts: 748
|
|
|
|
|
|
|
#4 |
|
Registered User
Join Date: May 2010
Location: London, UK
Posts: 62
|
That looks like a useful resource, thanks
Done so much reading around since I posted the original question and managed to pull together code and put it in the right (?) place to seemingly fix it to display on AGA. Running this before I install the copperlist: sub.l a1,a1 move.l GraphicsBase,a6 jsr _LVOLoadView(a6) ; Blank the screen jsr _LVOWaitTOF(a6) jsr _LVOWaitTOF(a6) and aligning the actual copperlist with cnop 0,8 Why does it work... more reading needed to determine that. Information overload?! |
|
|
|
|
|
#5 |
|
Leffmann with two n's
Join Date: Jul 2008
Location: Sweden
Posts: 1,189
|
On AGA, register FMODE is usually set to instruct the bitplane DMA to fetch data in chunks of 64 bits, so when all other bitplane parameters are set up for 16 bits like in OCS/ECS, you get these distorted graphics.
LoadView(NULL) fixes things because it sets up a Copper program that sets FMODE, BPLCON2 and BPLCON3 (and probably some other registers) to OCS/ECS compatible values. There's never any need to align the Copper program on 8 bytes though, a plain even address will do. I think calling LoadView like this will also enable internal display output if you have RTG in your system, so you should keep this in your program. |
|
|
|
|
|
#6 |
|
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 4,542
|
That's correct. Without the LoadView() call the display won't be switched to the RTG screen which means you won't see anything if you only have 1 monitor connected to your Amiga.
__________________
Makes me sick when I hear all the shit that you say So much crap coming out, it must take you all day There's a space kept in hell with your name on the seat With a spike in the chair just to make it complete |
|
|
|
|
|
#7 |
|
Registered User
Join Date: May 2010
Location: London, UK
Posts: 62
|
Thanks guys
![]() |
|
|
|
|
|
#8 |
|
Going nowhere
Join Date: Oct 2001
Location: United Kingdom
Age: 39
Posts: 5,026
|
First bit of code to try in your setup routine would be
move.w #0,$dff1fc This clears the Fmode burst modus, which 'should' correct the screen.
__________________
Former member of: LSD, Scoopex, Razor 1911, Dual Crew Shining, Rednex, Fairlight.www.southwestscrap.co.uk |
|
|
|
|
|
#9 |
|
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 4,542
|
The LoadView(0) call does this (and more) as Leffmann said.
__________________
Makes me sick when I hear all the shit that you say So much crap coming out, it must take you all day There's a space kept in hell with your name on the seat With a spike in the chair just to make it complete |
|
|
|
|
|
#10 |
|
Registered User
Join Date: May 2010
Location: London, UK
Posts: 62
|
$dff1fc is presumaby the f-mode register then? that is a "new" register that isn't featured in the O/ECS? which would explain why I couldn't find it in the hardware ref manual, yet there is lots of talk about it. Sometimes the blindingly obvious is staring you in the face, but you can't see it.
Anyway, I tested moving 0 into it, and I see that works too.The copperlist didn't mind not being 64bit aligned either. Thanks again for the help. I'll provide a demo of what I'm up to when it progresses beyond routine testing - at the moment I've got a software sprite moving about (not using the blitter - good (if simple) excercise in programming I think), platforms blitted into place, dual playfield, some copper background goodies and now it works under AGA. Lots more to learn, though. More question to follow? Maybe ![]() |
|
|
|
|
|
#11 |
|
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 4,542
|
Yes, it's the fetch mode register that was introduced with AGA. And yes, just setting the fetch mode register to 0 will work too but the LoadView approach is a much better one, especially if you want full compatibility with "alien" screen modes.
__________________
Makes me sick when I hear all the shit that you say So much crap coming out, it must take you all day There's a space kept in hell with your name on the seat With a spike in the chair just to make it complete |
|
|
|
|
|
#12 |
|
Going nowhere
Join Date: Oct 2001
Location: United Kingdom
Age: 39
Posts: 5,026
|
I know that, but its simple code to track down his screen problem and actually diagnose it as an fmode problem
![]()
__________________
Former member of: LSD, Scoopex, Razor 1911, Dual Crew Shining, Rednex, Fairlight.www.southwestscrap.co.uk |
|
|
|
|
|
#13 |
|
Registered User
Join Date: Mar 2010
Location: wisbech
Posts: 105
|
del.
Last edited by freehand; 29 September 2012 at 03:27. |
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Is there an Altered Destiny *AGA* fix? | BarryB | support.Games | 2 | 06 January 2012 00:31 |
| For sale: Indivision AGA / IDE Fix + Express + Software | Dreamcatcher | MarketPlace | 1 | 12 August 2010 18:56 |
| CARE Request: Tubular Worlds AGA - CD32 Fix | Heavy Stylus | project.CARE | 6 | 22 May 2009 12:03 |
| Indivision AGA 1200 + Elbox PC-Key fix! | Fingerlickin_B | Hardware mods | 10 | 24 September 2008 00:59 |
| Fix for Microprose games Pirates! and Colonization AGA? | hexaae | support.Games | 5 | 25 July 2006 15:53 |