Compiling Larger than 32K

Page 1/2
| 2

Par Chilly Willy

Expert (108)

Portrait de Chilly Willy

25-06-2021, 18:57

Is there an override command in TNIASM that will allow you to compile a binary larger than 32K

I have been through the txt manual and can not find any reference but maybe some of you have experience in this.

Please if you have no input can you not post "WHY would you want to do that?"
It is for some custom work and what I am doing will allow using binaries larger than 32k, I just can not compile them.

This is my header
FNAME "test.rom"
cpu z80

And that is about as far as I know concerning special directives in TNIASM

Being as I don't have the paid version of TNIASM I can not use MACROS and have no idea if it is possible in the standard version either.

!login ou Inscrivez-vous pour poster

Par Uninteresting

Champion (366)

Portrait de Uninteresting

25-06-2021, 19:54

I assume looking at how megarom mappers can be used in tniASM is of no use? In wiki here

I've never made a game larger than 32K; I'm sorry I can't be of any more help.

Par albs_br

Champion (499)

Portrait de albs_br

25-06-2021, 21:45

The example code suggested on wiki works 100%. I'm using it on my game. I use tniasm.

Par MsxKun

Paragon (1134)

Portrait de MsxKun

25-06-2021, 23:08

Chilly Willy wrote:

Is there an override command in TNIASM that will allow you to compile a binary larger than 32Kversion

What? There is no problem assembling files of any size in TniASM. Without anything special. Made MegaROMS with the standard version back in time with no problems.
If you want automatic megarom management, then not. But its easy just to have little pieces of code that you can call PAGES. Just use ORG properly. and fill the empty spaces between pages with ds

(this page start) ORG $4000
Stuff Code
(this page end)-> ds $8000-$ <- fills up to page is 16ks (can use $6000 if you want 8k page)

(another page) ORG whatever...
and so on

Par ro

Scribe (5056)

Portrait de ro

26-06-2021, 09:41

For the record, it is called "assembling" . Not "compiling"
For larger projects it is perfectly normal to plit sources too

Par santiontanon

Paragon (1830)

Portrait de santiontanon

26-06-2021, 15:38

I have re-implemented a lot of the tniasm functionality in my MDL assembler, and I wasn't aware of any tniasm restriction to 32KB, Chilly Willy can you share the error message tniasm is giving when assembling a binary larger than 32KB?

Par Chilly Willy

Expert (108)

Portrait de Chilly Willy

26-06-2021, 15:42

ro wrote:
For the record, it is called "assembling" . Not "compiling"
For larger projects it is perfectly normal to plit sources too[/q
You can call it making a cheese sandwich.

However if I try to compile something and it goes over 32k TNIASM refuses to create it hence the tricks.

The logic I decided to use instead of making it complicated is to just create a smaller binary that load data in through files.
Loads binary data into a ram space then the ram space is used instead of compiling everything into one massive binary.

My argument is that the Z80 can address 64K I would have thought you should be able to compile a binary up to 64k instead TNIASM cut me off at 32

So, I asked if there is a directive but as always I will find a way where as the alternative is not making my game.

Par theNestruo

Champion (428)

Portrait de theNestruo

26-06-2021, 16:29

tniASM v0.45 can create ROMs larger than 32kB (e.g.: Stevedore is 48kB).
I have just uploaded an MSXlib 48kB ROM example

Par MsxKun

Paragon (1134)

Portrait de MsxKun

26-06-2021, 17:47

TniASM doesn't refuse to create roms bigger than 32k.
You can make a 64k ROM if you want to, or MEGAROM. Yokai no Atsuki Tatakai was made in TniASM and its a 64k ROM. Never got any complain from the assembler. (yes, it's assembling, not compiling) And no special directives needed.
Just make sure your putting your start address properly, with ORG, cause if you put ORG at $C000 and then you try to asssemble 64kb of code, then yes, it could complain cause you'd go out of the Z80 address space Tongue

What error message is giving to you, maybe it's complaining about something else.

Par Chilly Willy

Expert (108)

Portrait de Chilly Willy

26-06-2021, 18:09

MsxKun wrote:

TniASM doesn't refuse to create roms bigger than 32k.
You can make a 64k ROM if you want to, or MEGAROM. Yokai no Atsuki Tatakai was made in TniASM and its a 64k ROM. Never got any complain from the assembler. (yes, it's assembling, not compiling) And no special directives needed.
Just make sure your putting your start address properly, with ORG, cause if you put ORG at $C000 and then you try to asssemble 64kb of code, then yes, it could complain cause you'd go out of the Z80 address space Tongue

What error message is giving to you, maybe it's complaining about something else.

THAT'S MY ISSUE THEN!!!!

I am starting at org $8000 which must then leave me with just 32K

I love you man....

Par MsxKun

Paragon (1134)

Portrait de MsxKun

26-06-2021, 19:09

You're welcome Tongue
Just move to $4000 then, or even $0000 to make a 48/64k ROM, but the parts at $0000-$3FFF and $C000-$FFFF gonna need extra care, specially to acces to the last. If it's a ROM...

Page 1/2
| 2