English Amiga Board


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

 
 
Thread Tools
Old 06 September 2018, 17:01   #1
fstarred
Registered User
 
fstarred's Avatar
 
Join Date: Mar 2018
Location: Rome
Posts: 173
Adding data to proper SECTION make strange behaviour...

I know it sounds silly, but.. I have a simple scrolling text with 3 bitplanes (standard, no interleaved).


Everything works OK until I add a module (MT_DATA) on the proper SECTION (see below)


Code:

SECTION    Data,DATA_C


FONT:
    incdir  "dh1:own/demo/repository/resources/fonts/"
    incbin  "32x32-FL.raw"


; added module

MT_DATA:
    incdir    "dh1:resources/mod/"    
    incbin    "mod.song"

When I launch the assembly command everything is ok, but when I launch the demo, the FONT is displayed with less bitplane..


I've attached two examples, one as it should be and one which is the screwed.

I'm going mad, anyone experienced something similar ???


I'm using AsmOne with FS-UAE
Attached Thumbnails
Click image for larger version

Name:	correct.png
Views:	103
Size:	3.9 KB
ID:	59707   Click image for larger version

Name:	wrong.png
Views:	100
Size:	3.3 KB
ID:	59708  
fstarred is offline  
Old 06 September 2018, 17:39   #2
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
If you upload somewhere the two executables i'll take a look.
ross is offline  
Old 06 September 2018, 18:10   #3
fstarred
Registered User
 
fstarred's Avatar
 
Join Date: Mar 2018
Location: Rome
Posts: 173
https://github.com/fstarred/amiga_pl.../demo/2/demo.s

Try to assemble both with binary under MT_DATA and without.


Then launch the demo on A500 with KS1.3 and see the results
fstarred is offline  
Old 06 September 2018, 18:28   #4
Don_Adan
Registered User
 
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 55
Posts: 1,959
Quote:
Originally Posted by fstarred View Post
I know it sounds silly, but.. I have a simple scrolling text with 3 bitplanes (standard, no interleaved).


Everything works OK until I add a module (MT_DATA) on the proper SECTION (see below)


Code:

SECTION    Data,DATA_C


FONT:
    incdir  "dh1:own/demo/repository/resources/fonts/"
    incbin  "32x32-FL.raw"


; added module

MT_DATA:
    incdir    "dh1:resources/mod/"    
    incbin    "mod.song"

When I launch the assembly command everything is ok, but when I launch the demo, the FONT is displayed with less bitplane..


I've attached two examples, one as it should be and one which is the screwed.

I'm going mad, anyone experienced something similar ???


I'm using AsmOne with FS-UAE
Maybe your code used memory from MT_DATA area? You can place empty area "ds.b 100000" between both labels.
Don_Adan is offline  
Old 06 September 2018, 18:34   #5
majikeyric
Registered User
 
majikeyric's Avatar
 
Join Date: Oct 2015
Location: France
Posts: 82
maybe you need your data to be word aligned somewhere in you section? (using 'even').
majikeyric is offline  
Old 06 September 2018, 18:36   #6
Don_Adan
Registered User
 
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 55
Posts: 1,959
Perhaps the easiest way to psedo fix is exchanging place for both incbins. First mod, second fonts.
Don_Adan is offline  
Old 06 September 2018, 18:37   #7
roondar
Registered User
 
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,409
I wonder if this is fixed if you change the Screen section to a non-BSS one.
If I recall correctly, BSS sections are not correctly supported by Amiga OS 1.3.

Though you would expect that lead to trouble with data on the screen buffer and not really with the FONT data.

Last edited by roondar; 06 September 2018 at 18:43.
roondar is offline  
Old 06 September 2018, 19:09   #8
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
There is a bug in code

Hint: adding words is not always good
ross is offline  
Old 06 September 2018, 19:17   #9
fstarred
Registered User
 
fstarred's Avatar
 
Join Date: Mar 2018
Location: Rome
Posts: 173
Ross do you mean about EVEN keyword after TEXT? Uhm I'm very curious now!
fstarred is offline  
Old 06 September 2018, 19:22   #10
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
Quote:
Originally Posted by roondar View Post
If I recall correctly, BSS sections are not correctly supported by Amiga OS 1.3.
BSS sections are properly supported.

I've to check, but is the BSS part of DATA (and CODE) sections that are not zeroed.
ross is offline  
Old 06 September 2018, 19:34   #11
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
Quote:
Originally Posted by fstarred View Post
Ross do you mean about EVEN keyword after TEXT? Uhm I'm very curious now!
No.

Think about what differs between sum a word value on Dx and Ax registers.
However it's a pretty sneaky mistake and manifests itself, rightly, if you 'move' the data in memory.


(scusa, dovrei dirtelo subito, mi sento un po' ..)
ross is offline  
Old 06 September 2018, 19:37   #12
fstarred
Registered User
 
fstarred's Avatar
 
Join Date: Mar 2018
Location: Rome
Posts: 173
Gosh this is not my first time on this kind of error.. Unfortunately right now I can't try because I'm on on a PC however.. challenge accepted!

(Figurati anzi che ti sei preso il disturbo di darci un occhiata)
fstarred is offline  
Old 06 September 2018, 21:20   #13
fstarred
Registered User
 
fstarred's Avatar
 
Join Date: Mar 2018
Location: Rome
Posts: 173
Quote:
Originally Posted by ross View Post
No.

Think about what differs between sum a word value on Dx and Ax registers.
However it's a pretty sneaky mistake and manifests itself, rightly, if you 'move' the data in memory.


(scusa, dovrei dirtelo subito, mi sento un po' ..)

add.l #ScrBpl*h,d0
fstarred is offline  
Old 06 September 2018, 22:09   #14
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
Quote:
Originally Posted by fstarred View Post
add.l #ScrBpl*h,d0
Bingo!
ross is offline  
Old 07 September 2018, 00:02   #15
roondar
Registered User
 
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,409
Quote:
Originally Posted by ross View Post
BSS sections are properly supported.

I've to check, but is the BSS part of DATA (and CODE) sections that are not zeroed.
Well, I clearly misremembered then. I'm sure I read something about BSS sections and Kickstart 1.3 though. No idea what then, perhaps it's that they're not cleared?


Quote:
Originally Posted by fstarred
add.l #ScrBpl*h,d0
Yeah, that's a sneaky one. Part of the reason I try to keep addresses in address registers
roondar is offline  
Old 07 September 2018, 07:40   #16
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
Quote:
Originally Posted by roondar View Post
Well, I clearly misremembered then. I'm sure I read something about BSS sections and Kickstart 1.3 though. No idea what then, perhaps it's that they're not cleared?
It is "code_bss" and "data_bss", i.e. code or data sections with empty region at the end, that require V37+.
meynaf is offline  
Old 07 September 2018, 11:55   #17
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
BSS space after code and data has been supported since 1.2 and will be uninitialized. On 2.0 and later it will be zero-filled.
Leffmann is offline  
Old 08 September 2018, 11:01   #18
borchen
Registered User
 
Join Date: Jan 2016
Location: NL
Posts: 32
I see you have two chipdata-sections:


Code:
...

SECTION    GRAPHIC,DATA_C
...
SECTION    Data,DATA_C
...

This ofcourse is not wrong, but I think it's safe to remove the second one.
borchen is offline  
Old 08 September 2018, 11:20   #19
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
Doesn't hurt at all. As long as there are no PC-relative references between those sections (which you rarely have in data).

It even makes it more likely to be able to load the executable in a heavily fragmented low-memory situation.
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
vasm strange behaviour Den Coders. Asm / Hardware 3 12 December 2015 15:24
Strange behaviour with hotkeys brolly support.WinUAE 2 17 August 2013 01:33
Strange guru behaviour! deejaya support.Other 11 31 January 2009 21:01
strange sound behaviour in 0.8.27 Domenico support.WinUAE 8 13 October 2006 11:24
Strange A1200 behaviour manicx support.Hardware 39 09 November 2005 08:32

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 03:15.

Top

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