mirror of
https://github.com/irmen/prog8.git
synced 2026-10-22 05:02:58 +00:00
c128: define golden ram area at $1300-$1BDF
This commit is contained in:
1 parent
b05bc9ac0e
commit
2d3c20d347
5 files changed
+23
-9
No files matched your search
@@ -31,10 +31,10 @@ class C128Target: ICompilationTarget,
|
||||
override val PROGRAM_LOAD_ADDRESS = 0x1c01u
|
||||
override val PROGRAM_MEMTOP_ADDRESS = 0xc000u
|
||||
|
||||
override val BSSHIGHRAM_START = 0u // TODO address?
|
||||
override val BSSHIGHRAM_END = 0u // TODO address?
|
||||
override val BSSGOLDENRAM_START = 0u // TODO address?
|
||||
override val BSSGOLDENRAM_END = 0u // TODO address?
|
||||
override val BSSHIGHRAM_START = 0u // no high ram
|
||||
override val BSSHIGHRAM_END = 0u // no high ram
|
||||
override val BSSGOLDENRAM_START = 0x1300u
|
||||
override val BSSGOLDENRAM_END = 0x1bdfu // note: $1be0 - $1bff contains the 16 virtual registers
|
||||
|
||||
override lateinit var zeropage: Zeropage
|
||||
|
||||
|
||||
@@ -868,7 +868,7 @@ skip:
|
||||
}
|
||||
|
||||
sub fill_scanline_left() -> bool {
|
||||
; TODO maybe this could use vera auto decrement, but that requires some clever masking calculations
|
||||
; TODO maybe this could use vera auto decrement, but that requires some clever masking calculations on the edges of the span to set only the correct bits in those vram bytes
|
||||
cx16.r9s = xx
|
||||
while xx >= 0 {
|
||||
if pgetset()
|
||||
@@ -879,7 +879,7 @@ skip:
|
||||
}
|
||||
|
||||
sub fill_scanline_right() {
|
||||
; TODO maybe this could use vera auto increment, but that requires some clever masking calculations
|
||||
; TODO maybe this could use vera auto decrement, but that requires some clever masking calculations on the edges of the span to set only the correct bits in those vram bytes
|
||||
cx16.r9s = xx
|
||||
while xx <= width-1 {
|
||||
if pgetset()
|
||||
|
||||
@@ -17,7 +17,7 @@ import kotlin.math.*
|
||||
private typealias ConstExpressionCaller = (args: List<Expression>, position: Position, program: Program) -> NumericLiteral
|
||||
|
||||
// Maps builtin functions to constant evaluators for compile-time execution
|
||||
// TODO: add support for builtin functions that return multiple return values (such as divmod)
|
||||
// TODO: add support for builtin functions that return multiple return values (such as divmod and lmh)
|
||||
internal val constEvaluatorsForBuiltinFuncs: Map<String, ConstExpressionCaller> = mapOf(
|
||||
"abs__byte" to { a, p, prg -> oneIntArgOutputInt(a, p, prg, true) { abs(it).toDouble() } },
|
||||
"abs__word" to { a, p, prg -> oneIntArgOutputInt(a, p, prg, true) { abs(it).toDouble() } },
|
||||
|
||||
@@ -278,9 +278,9 @@ One or more .p8 module files
|
||||
Show a more detailed breakdown of the time taken in various compiler phases, for performance analysis of the compiler itself.
|
||||
|
||||
``-varsgolden``
|
||||
Like ``-varshigh``, but places the variables in the $0400-$07FF "golden ram" area instead.
|
||||
Like ``-varshigh``, but places the variables in the "golden ram" area instead (e.g. $0400-$07FF on CX16, $1300-$1BDF on C128).
|
||||
Because this is in normal system memory, there are no bank switching issues.
|
||||
This mode is only available on the Commander X16, and possibly on custom configured targets.
|
||||
This mode is only available on the Commander X16 and the Commodore 128, and possibly on custom configured targets.
|
||||
|
||||
``-varshigh <rambank>``
|
||||
Places uninitialized non-zeropage variables in a separate memory area, instead of inside the program itself.
|
||||
|
||||
@@ -138,6 +138,20 @@ Footnotes for the Commodore 64
|
||||
may free up more locations for use by Prog8 or to reserve them for other things.
|
||||
|
||||
|
||||
Footnotes for the Commodore 128
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
.. index:: single: Targets; Commodore 128 notes
|
||||
|
||||
*Golden Ram $1300 - $1BDF*
|
||||
Application RAM area, free to use if you don't use BASIC variables or strings.
|
||||
Note: $1BE0 - $1BFF are used for the 16 virtual registers cx16.r0 .. cx16.r15.
|
||||
There is no "high ram" defined on the C128.
|
||||
|
||||
*Program RAM $1C00 - $BFFF*
|
||||
On the C128 the Basic ROM is banked out by default, reclaiming the RAM area from $1C00 to $BFFF.
|
||||
This gives about 41 Kb of contiguous RAM for Prog8 programs.
|
||||
|
||||
|
||||
Zero page usage by the Prog8 compiler
|
||||
-------------------------------------
|
||||
.. index:: single: Targets; Zero page usage
|
||||
|
||||
Reference in new issue
Block a user