10 July 2021, 16:36 | #1 | |
OctaMED Music Composer
Join Date: Jan 2009
Location: Venice - Italy
Age: 49
Posts: 666
|
SECTION CODE - Problem with chunks and FAST ram
HELP!!
I'm building my first intro requiring 512Kb+. So far I manage to load everything not needing to be on CHIP in "SECTION CODE" and samples+gfx in "SECTION DATA_C". Everything is OK, vasm builds and returns as expected: Quote:
Replicating the configuration on WinUAE sorted the same results. This applies only for KS1.3, from KS 2.0 everything is fine. Also tried with ASM-PRO, same result. Looks like there is a problem with fast starting address. I'm using Photon's Mini Wrapper, full code here https://github.com/KONEY/lost_octame.../TR-808_MAIN.s I think it's a quite trivial problem but I can't figure out exactly what to do, I guess I need to find the largest non-chip mem chunk and pass it to... what? Also when running the program it won't even load, just exit so I wonder if any changes at code could sort any effect at all...? Please, any help or example would be appreciated Thanks |
|
10 July 2021, 17:08 | #2 | |
Registered User
Join Date: Jan 2019
Location: Germany
Posts: 3,215
|
Quote:
|
|
10 July 2021, 17:22 | #3 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
|
Does the system actually have big enough contiguous free chip ram chunk? Z2 fast vs slow RAM is not exactly equal and might cause slight memory usage differences.
(or perhaps it is the most common problem: different number of floppy drives) |
10 July 2021, 17:23 | #4 |
Registered User
Join Date: Jun 2016
Location: europe
Posts: 1,039
|
Did you try avail to see how much of the 512KB base chip is available, and how large is the largest segment? If has to be at least 439KB (512KB minus wb screen, disk buffers, ...).
|
10 July 2021, 17:41 | #5 | |
Registered User
Join Date: Aug 2004
Location:
Posts: 3,335
|
Quote:
You can use ShortRel to convert those to RELOC32 which does work on Kickstart 1.x. There is probably a vasm option to tell it to only create reloc32 hunks in the first place too. |
|
10 July 2021, 17:56 | #6 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
|
Did you use a linker or did you let vasm generate the hunk-format executable with
-Fhunkexeoption? In the latter case you have to use the -kick1hunksoption, as vasm will output OS2.0 compatible executables by default. EDIT: Noticed that your error was 103. Probably there is just no Chip RAM region which is large enough with your A1000 config, as others suggested. Last edited by phx; 10 July 2021 at 18:10. Reason: 103 |
10 July 2021, 18:10 | #7 |
OctaMED Music Composer
Join Date: Jan 2009
Location: Venice - Italy
Age: 49
Posts: 666
|
thanks, i'll try everything. Anyway I did a test with asm-pro and the same problem happened.
I should have chip ram free, when using slow fast the chip ram is the same amount and it works. |
10 July 2021, 18:22 | #8 | ||
OctaMED Music Composer
Join Date: Jan 2009
Location: Venice - Italy
Age: 49
Posts: 666
|
AVAIL with 512kb CHIP + 512kb SLOW: (WORKS!)
Quote:
Quote:
|
||
10 July 2021, 18:27 | #9 |
Registered User
Join Date: Jun 2016
Location: europe
Posts: 1,039
|
Yeah, your largest chip mem chunk is not large enough (~1KB too short). Try addk21k (this one is the most harmless, compared to the rest of the addXk family) or reduce the size of disk buffers.
|
10 July 2021, 18:36 | #10 |
OctaMED Music Composer
Join Date: Jan 2009
Location: Venice - Italy
Age: 49
Posts: 666
|
yes I just figured it out, it works! Do you know where I can find add21k? on aminet there's only a 36k version.
|
11 July 2021, 00:16 | #11 |
OCS forever!
Join Date: Mar 2019
Location: Birmingham, UK
Posts: 418
|
Slightly off topic but I'd also recommend having your winuae config having a df0: and df1: as that reduces the chipmem as well. Quite a few error 103 comments on pouet when people attempt to run intros with a df1: (like the old days) so nice to catch those errors early and put in the readme/nfo.
|
11 July 2021, 01:20 | #12 |
Registered User
Join Date: Jan 2011
Location: -
Posts: 728
|
|
11 July 2021, 07:40 | #13 |
Registered User
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 55
Posts: 1,959
|
Seems you can too split your chip_c section on two chip_c sections. First large, about 440KB and second small about 9KB.
|
11 July 2021, 20:27 | #14 | ||
OctaMED Music Composer
Join Date: Jan 2009
Location: Venice - Italy
Age: 49
Posts: 666
|
Quote:
Not OT, actually quite relevant. Thanks for the tip! grabbed, thanks! Quote:
And what should happen this way? |
||
11 July 2021, 20:42 | #15 |
Registered User
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 55
Posts: 1,959
|
Ok, seems my idea was not good, you must to fit chip memory different. first chip hunk must have about 447800 bytes, and second chip hunk about 1000 bytes.
|
12 July 2021, 13:09 | #16 |
Registered User
Join Date: Jun 2020
Location: Brno
Posts: 90
|
Are you sure you need all your data to reside in the chip RAM from the beginning? It's risky for your program to require such a large continuous block of memory on 512kB chip RAM machines (see Antiriad's comment). Maybe you can place some of your data to fast/slow memory and move them (possibly even decompress) later to the chip RAM only when needed? In other words: Detect that some of your data can easily overlap through the program's lifetime
|
12 July 2021, 13:42 | #17 |
OctaMED Music Composer
Join Date: Jan 2009
Location: Venice - Italy
Age: 49
Posts: 666
|
I do If you look at the source code you'll notice I even splitted .MED file into two parts and modified the player so that everything but samples will be loaded in fast ram. CHIP ram will be crammed to the rim with samples
|
12 July 2021, 14:36 | #18 |
Registered User
Join Date: Aug 2020
Location: Huddinge
Posts: 24
|
Slightly OT but @hoffmann did a nice write up of how they streamed samples from disk "just in time" in the demo EON https://hoffman.home.blog/2019/04/27/eon/, (scroll down to the SAMPLE STREAMING section).
Perhaps you can use a similar technique and copy samples from fast ram to chip ram? |
12 July 2021, 15:17 | #19 |
OctaMED Music Composer
Join Date: Jan 2009
Location: Venice - Italy
Age: 49
Posts: 666
|
nice read, thanks!
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
SECTION statement and the CHIP/FAST attribute | Apollo | Coders. Asm / Hardware | 3 | 15 June 2013 18:18 |
Problem playing modules from fast ram | vagrant | support.Hardware | 4 | 19 February 2013 23:51 |
Use of 4MB PCMCIA Fast Flash Memory as Fast RAM in A1200 | nkarytia | support.Hardware | 10 | 16 September 2011 13:37 |
help optimising a section of code | h0ffman | Coders. General | 15 | 02 March 2011 13:19 |
32-bit FAST RAM vs. ZII FAST RAM | polbit | support.Hardware | 16 | 28 January 2007 20:16 |
|
|