29 January 2020, 12:15 | #1 |
Registered User
Join Date: Jan 2020
Location: Saltash
Posts: 27
|
Screen Setup
Hi Guys,
After following Graeme Cowie's configuration for setting up VASM and running on a VM I thought I'd dig out a small shooter I did back in '94. I've got it running but the display is out of alignment, which I think is a copper issue... reading another thread the window size and overscan values I have a those for a standard PAL screen, and I've tinkered with the odd/even modulos but to no avail so far. Does anyone know where else to look? Code:
CopList: Dc.W WINTL,$2C81,WINBR,$2CC1 ; Window Size Dc.W OVER1,$0038,OVER2,$00D0 ; OverScan Values Dc.W HWSCR,$0000,PRIOR,$0008 ; HW Scroll + Priority Dc.W ODMOD,$0004,EVMOD,$0004 ; Odd+Even Modulos Dc.W SCREN,LOWR3 ; Screen Type Dc.W BPL1A,BASIC,BPL1B,$09FC ; Bitplane 1 Dc.W BPL2A,BASIC,BPL2B,$49FC ; Bitplane 2 Dc.W BPL3A,BASIC,BPL3B,$89FC ; Bitplane 3 Code:
ODMOD: Equ $0108 ; Odd Modulos EVMOD: Equ $010A ; Even Modulos WINTL: Equ $008E ; Window Top/Left WINBR: Equ $0090 ; Window Bottom/Right OVER1: Equ $0092 ; OverScan 1 OVER2: Equ $0094 ; OverScan 2 SCREN: Equ $0100 ; Type Of Screen HWSCR: Equ $0102 ; Hardware Scroll PRIOR: Equ $0104 ; Priority LOWR1: Equ $1200 ; Lowres 1 LOWR2: Equ $2200 ; Lowres 2 LOWR3: Equ $3200 ; Lowres 3 LOWR4: Equ $4200 ; Lowres 4 LOWR5: Equ $5200 ; Lowres 5 |
29 January 2020, 13:25 | #2 |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,614
|
Copper list looks OK (although I turn bitplane DMA on after setting bitplane pointers). It might be the rendering that has the wrong screen width (or modulo). Your current screen width is 320+4*8=352, of which 320 is shown. You can test by poking a byte at screen+0 and another at screen+44, they should line up vertically.
Last edited by Photon; 29 January 2020 at 13:30. |
29 January 2020, 13:27 | #3 |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,476
|
Your bitplane screen buffer seems for a 512x256 screen ($49FC-$09fc=$4000->/256=64->*8=512).
As your registers setup is for a 320 screen, you need to set modulo registers to 512/8-320/8=64-40=$18 |
29 January 2020, 14:59 | #4 |
Registered User
Join Date: Jan 2020
Location: Saltash
Posts: 27
|
Thanks for the suggestions... I tried odd and even modulos at $18 but that still displayed the same as before.
I'm assuming that by "although I turn bitplane DMA on after setting bitplane pointers" you mean setting the screen type after the bitplanes like so: Code:
CopList: Dc.W WINTL,$2C81,WINBR,$2CC1 ; Window Size Dc.W OVER1,$0038,OVER2,$00D0 ; OverScan Values Dc.W HWSCR,$0000,PRIOR,$0008 ; HW Scroll + Priority Dc.W ODMOD,$0018,EVMOD,$0018 ; Odd+Even Modulos Dc.W BPL1A,BASIC,BPL1B,$09FC ; Bitplane 1 Dc.W BPL2A,BASIC,BPL2B,$49FC ; Bitplane 2 Dc.W BPL3A,BASIC,BPL3B,$89FC ; Bitplane 3 Dc.W SCREN,LOWR3 ; Screen Type |
29 January 2020, 15:17 | #5 |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,476
|
Without further info, is impossible a definite answer.
Photon's and mine are only suggestions based on what you posted (very little about real conditions in your setup). So if you want a proper response better if you post more. |
29 January 2020, 15:33 | #6 |
Registered User
Join Date: Jan 2020
Location: Saltash
Posts: 27
|
Thanks Ross, I'll see if I can strip the code out and make something I can post.
I'm returning to this after 25 years so it's not exactly fresh in my mind! |
29 January 2020, 15:42 | #7 | |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,476
|
Quote:
(x=512 could be simply a value used to use shift instead of mul in code) |
|
29 January 2020, 16:35 | #8 |
Registered User
Join Date: Oct 2015
Location: Landsberg / Germany
Posts: 526
|
Just a thought: Could it be that the screen setup is fine but the modulo values within the blitting / bitplane copying code should be +4?
|
29 January 2020, 16:41 | #9 |
Lemon. / Core Design
Join Date: Mar 2016
Location: Tier 5
Posts: 1,212
|
Are you running on AGA? Is FMODE register set to something other than 0 ?
|
29 January 2020, 22:30 | #10 | |
Registered User
Join Date: Jan 2020
Location: Saltash
Posts: 27
|
Quote:
Not as far as I can tell, but thanks for the idea. |
|
31 January 2020, 19:02 | #11 | |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,614
|
Quote:
The other stuff shouldn't be affected. I think you're setting values while the screen is displayed. Could you post the full copper list? I think we'll solve the problem then. Obviously I'm assuming that you don't change values in the copper list. If you do, the changes might come just as the copper list is being read and displayed, and you must put a wait for the "top left" of the window before the write to BPLCON0. |
|
03 February 2020, 12:20 | #12 |
Registered User
Join Date: Jan 2020
Location: Saltash
Posts: 27
|
Hi Guys,
Just an update, I finally managed to sort this by specifically setting FMODE to 0 in the copper. This didn't work initially as I'd not realised that I was updating the copper is specific places in code and of course, adding the new command meant all my copper offsets were off. This of course had the knock-on effect of me having to update all the copper code... the joys of returning to code 25 years after you wrote it! lol Anyway, the main ship sprite is not displaying properly but for those who are interested, here's the video. This was really just a coding test to try and work on things like collision and player control etc. so it's nothing advance, but happy it's working again! [ Show youtube player ] Thanks to everyone for their help and suggestions! |
03 February 2020, 12:31 | #13 |
Registered User
Join Date: Oct 2015
Location: Landsberg / Germany
Posts: 526
|
Great you got your old code to work. Looks nice!
|
03 February 2020, 15:16 | #14 |
Lemon. / Core Design
Join Date: Mar 2016
Location: Tier 5
Posts: 1,212
|
|
03 February 2020, 15:58 | #15 |
Registered User
Join Date: Jan 2020
Location: Saltash
Posts: 27
|
|
03 February 2020, 17:52 | #16 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,500
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Smooth H-scrolling platform game in AMOS, screen copy vs screen offset? | Damiga | Coders. AMOS | 32 | 24 October 2023 19:00 |
Resolution Autoswitch + Auto Integer Scaling: Screen stuck 25% below top of screen | bladecgn | support.WinUAE | 21 | 17 March 2019 17:52 |
Blitz Basic Screen setup | Ze Emulatron | Coders. Blitz Basic | 2 | 29 November 2012 22:43 |
Black screen with 50 hz D3D not(DD) in WinUAE 2.3.3 from 60 hz setup in Win 7 | Mixter | support.WinUAE | 7 | 26 February 2012 19:19 |
Amiga 600 not booting... Yellow screen, and Red screen when turning PSU off | jbenam | support.Hardware | 34 | 20 March 2011 22:10 |
|
|