選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

63 行
2.8KB

  1. # ld65 configuration for Stonehold 64 (C64). See docs/memory-map.md.
  2. #
  3. # $0801-$37FF MAIN program: code, rodata, data, BSS, C stack (top 2 KB)
  4. # $3800-$3FFF CHARMEM custom character set (VIC bank 0) segment CHARSET
  5. # $4000-$7FFF MAPMEM 128x128 tile map, one byte per tile segment MAP
  6. # $8000-$CFFF HIMEM large uninitialised buffers segment HIBSS
  7. #
  8. # The areas are laid out end to end, so ld65 stops the build with
  9. # "Memory area ... overflow" if anything grows past its boundary.
  10. # cc65's startup code puts the top of the C stack at the end of MAIN ($3800);
  11. # the heap (if ever used) lies between the end of BSS and the stack.
  12. FEATURES {
  13. STARTADDRESS: default = $0801;
  14. }
  15. SYMBOLS {
  16. __LOADADDR__: type = import;
  17. __EXEHDR__: type = import;
  18. __STACKSIZE__: type = weak, value = $0800; # 2k stack
  19. __LOWTOP__: type = weak, value = $3800; # end of program memory = charset start
  20. }
  21. MEMORY {
  22. ZP: file = "", define = yes, start = $0002, size = $001A;
  23. LOADADDR: file = %O, start = %S - 2, size = $0002;
  24. HEADER: file = %O, define = yes, start = %S, size = $000D;
  25. MAIN: file = %O, define = yes, start = __HEADER_LAST__, size = __LOWTOP__ - __HEADER_LAST__;
  26. BSS: file = "", start = __ONCE_RUN__, size = __LOWTOP__ - __STACKSIZE__ - __ONCE_RUN__;
  27. CHARMEM: file = "", define = yes, start = $3800, size = $0800;
  28. MAPMEM: file = "", define = yes, start = $4000, size = $4000;
  29. HIMEM: file = "", define = yes, start = $8000, size = $5000;
  30. }
  31. SEGMENTS {
  32. ZEROPAGE: load = ZP, type = zp;
  33. LOADADDR: load = LOADADDR, type = ro;
  34. EXEHDR: load = HEADER, type = ro;
  35. STARTUP: load = MAIN, type = ro;
  36. LOWCODE: load = MAIN, type = ro, optional = yes;
  37. CODE: load = MAIN, type = ro;
  38. RODATA: load = MAIN, type = ro;
  39. DATA: load = MAIN, type = rw;
  40. INIT: load = MAIN, type = rw; # uninitialized, but reserves output space
  41. ONCE: load = MAIN, type = ro, define = yes;
  42. BSS: load = BSS, type = bss, define = yes;
  43. CHARSET: load = CHARMEM, type = bss, define = yes;
  44. MAP: load = MAPMEM, type = bss, define = yes;
  45. HIBSS: load = HIMEM, type = bss, define = yes, optional = yes;
  46. }
  47. FEATURES {
  48. CONDES: type = constructor,
  49. label = __CONSTRUCTOR_TABLE__,
  50. count = __CONSTRUCTOR_COUNT__,
  51. segment = ONCE;
  52. CONDES: type = destructor,
  53. label = __DESTRUCTOR_TABLE__,
  54. count = __DESTRUCTOR_COUNT__,
  55. segment = RODATA;
  56. CONDES: type = interruptor,
  57. label = __INTERRUPTOR_TABLE__,
  58. count = __INTERRUPTOR_COUNT__,
  59. segment = RODATA,
  60. import = __CALLIRQ__;
  61. }

Powered by TurnKey Linux.