-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[question/feature] Where is the MC10 code located by default? #20
Comments
The -C option to the linker sets the code address (-B bss -D data, but those otherwise just follow the code) and -Z for the direct page The default for the MC10 is -b -C 17500 -Z 0x90 (-b is binary) The machine locates its own system variables and possibly stack (not sure where basic puts it initially) straight after the video |
Thanks for replying! |
If the top level cc68 command does not have an option for the start-address, would you please consider having such an option to pass it to the linker for the sake of convenience? If that is not possible or too much work, would you consider $4C00 as default? For my specific case I can rewrite my Makefile to use the explicit compile only cc68, the linker command and the tool to generate a tape image as separate commands. |
17500.. it's the right start spot for most MC-10 code, especially as you've usually on got 4K of RAM. I'll look at a setting to change the code base or a variant MC10 build type. |
@EtchedPixels I understand. If a setting is too much of a hassle, a second target, e.g mc10exp, with start address at $4C00 (19456) should also do because $0C00=3k=128x96 in 4 colors, which is the highest possible resolution on an unmodified M-10. |
17500 was what I was told to use - I assume there's a bit below it still being used by basic and system variables on the load/exec. |
@EtchedPixels I am no expert. I would like to run some experiments with lower and higher start address. Do I only need to change all occurrences of 17500 in cc.c or is 17500 also coded elsewhere? |
It's only in cc.c I think - and maybe in tapeify |
Could you please implement an option to change the start address for the mc10? I suppose it would also help for other targets. |
I'm planning to retire this compiler in favour of the one I've been working on from scratch so don't intend to do anything to it at this point. Once that is stable I'll have a look at splitting out the other tools from this one for the MC10 so it's easier to use including default addresses etc. |
Where is the code for the MC10 target located by default when compiled by running the following command?
Is it located at $4200 just after text mode video ram?
I am asking because I fear that this would break any program that uses graphics mode (as they may take 3k or $4000-$4BFFF) if I am doing the math correctly.
Where are the different sections in memory? rodata? Maybe the code starts at $4C00 but it maybe the C software stack or the rodata is somewhere in $4000-$4BFFF and it is interfering with the graphics.
I have tried to use the
-C
and--start-addr
options withcc68
but they are not available.I have not found a cfg linker file to control where the sections are in memory (such as the ones in CC65).
Is there a way to output a map file that shows where variables are in memory?
I see there may be a way to do this by using the linker
ld68
command, though.The text was updated successfully, but these errors were encountered: