Author Topic: [CC65][linker][help] How can I configure CC65's linker to build PCE roms > 8k  (Read 951 times)

Fabrizio Caruso

  • Newbie
  • *
  • Posts: 2
Hi everyone!

I am developing CROSS CHASE,
https://github.com/Fabrizio-Caruso/CROSS-CHASE
which is a universal 8 bit game for ALL 8-bit computer/consoles/handhelds. The very SAME code is used for about 100 different targets.


For targets with the 6502 CPU (and derivaties) I am using CC65.
For the PCEngine I have not been able to get it to build any rom bigger than 8k.
Currently I can get a working build if I use 8k in $E000-$FFFF.

Could someone please help me on this?

  Fabrizio

« Last Edit: February 06, 2018, 07:36:41 PM by Fabrizio Caruso »

Arkhan

  • Hero Member
  • *****
  • Posts: 14142
  • Fuck Elmer.
    • Incessant Negativity Software
Re: [CC65][linker][help] How can I configure CC65's linker to build roms > 8k
« Reply #1 on: February 06, 2018, 06:45:29 PM »
I honestly have no clue.  have you asked at NES or C64 forums? 

If someone else here doesn't answer and you find answers elsewhere, let us know!
[Fri 19:34]<nectarsis> been wanting to try that one for awhile now Ope
[Fri 19:33]<Opethian> l;ol huge dong

I'm a max level Forum Warrior.  I'm immortal.
If you're not ready to defend your claims, don't post em.

Fabrizio Caruso

  • Newbie
  • *
  • Posts: 2
Re: [CC65][linker][help] How can I configure CC65's linker to build roms > 8k
« Reply #2 on: February 06, 2018, 07:35:48 PM »
This is PCE-related. Sorry for not being explicit about it.

spenoza

  • Hero Member
  • *****
  • Posts: 2751
Ping Elmer. I think CC65 is his bag.
<a href="http://www.pcedaisakusen.net/2/34/103/show-collection.htm" class="bbc_link" target="_blank">My meager PC Engine Collection so far.</a><br><a href="https://www.pcenginefx.com/forums/" class="bbc_link" target="_blank">PC Engine Software Bible</a><br><a href="http://www.racketboy.com/forum/" c

Arkhan

  • Hero Member
  • *****
  • Posts: 14142
  • Fuck Elmer.
    • Incessant Negativity Software
This is PCE-related. Sorry for not being explicit about it.

Oh, I figured there were other 6502s in the 100s of targets.

Elmer probably has some idea of it.

I only ever used CC65 with a C64 and it was about 8 years ago.
[Fri 19:34]<nectarsis> been wanting to try that one for awhile now Ope
[Fri 19:33]<Opethian> l;ol huge dong

I'm a max level Forum Warrior.  I'm immortal.
If you're not ready to defend your claims, don't post em.

elmer

  • Hero Member
  • *****
  • Posts: 2148
For targets with the 6502 CPU (and derivaties) I am using CC65.

For the PCEngine I have not been able to get it to build any rom bigger than 8k.
Currently I can get a working build if I use 8k in $E000-$FFFF.

Could someone please help me on this?

See here ...

http://www.pcenginefx.com/forums/index.php?topic=18654.msg448587#msg448587

But, after further investigation ...

I *really* don't recommend using CC65 on the PCE at this point, because the compiler and assembler really don't like that our PCE's HuC6280 processor has zero page at $2000 instead of $0000.

Also, their PCE library support was woeful the last time I looked.

They've been mulling-over how to fix CA65 for nearly 9 months now, and the trail has gone dead.


That's why I started putting so much effort into fixing up and improving HuC instead.

ccovell

  • Hero Member
  • *****
  • Posts: 2245
I *really* don't recommend using CC65 on the PCE at this point, because the compiler and assembler really don't like that our PCE's HuC6280 processor has zero page at $2000 instead of $0000.

Is the compiler/assembler actually referencing ZP as word addresses each time?  :/

elmer

  • Hero Member
  • *****
  • Posts: 2148
Is the compiler/assembler actually referencing ZP as word addresses each time?  :/

If a label is tagged as a ZP label, then (IIRC) it will usually use ZP addressing ... except inside procedures, when all the rules change because nested label space handling is horribly broken in CA65.

BUT ... any label in $00xx range is automatically addressed as ZP if possible, and anything in our $20xx range is word-addressed.

I proposed a couple of quick-hack workarounds ... but they would still break in nested label spaces.

CA65 needs some serious work ... and the current maintainers are treating the source code like the Holy Grail.

Another reason for me to mess with HuC ... it *can* be messed with, and the only reason that its code sometimes sucks vs CC65, is because of specific CC65 peephole optimizations that could (not trivially, but with some work) be applied to HuC.

Both compilers are based off of Ron Cain's original Small C.

Gredler

  • Guest
Good to see you back around these parts Elmer, hope all is going well with you sir.

I have such little knowledge on this I didn't want to chime in, but I also wanted to say that Elmer would know whats up and that last I heard CC65 was a dead end and your efforts on HuC were due to that rabbit hole avoidance.


Arkhan

  • Hero Member
  • *****
  • Posts: 14142
  • Fuck Elmer.
    • Incessant Negativity Software
I apparently read all about this last year and don't even remember doing so, which shows you how "if you don't use it, you lose it" is a thing.

lol
[Fri 19:34]<nectarsis> been wanting to try that one for awhile now Ope
[Fri 19:33]<Opethian> l;ol huge dong

I'm a max level Forum Warrior.  I'm immortal.
If you're not ready to defend your claims, don't post em.