mirror of
https://github.com/irmen/prog8.git
synced 2025-01-11 13:29:45 +00:00
some loose ends
This commit is contained in:
parent
c4f53fe525
commit
4a0f15eb88
@ -399,8 +399,11 @@ romsub $ff56 = joystick_get(ubyte joynr @A) -> ubyte @A, ubyte @X, ubyte @Y
|
||||
romsub $ff56 = joystick_get2(ubyte joynr @A) clobbers(Y) -> uword @AX ; alternative to above to not have the hassle to deal with multiple return values
|
||||
|
||||
; Audio (bank 10)
|
||||
romsub $C09F = audio_init() -> ubyte @Pc ; (re)initialize PSG and YM audio chips
|
||||
; TODO: add more of the audio routines here.
|
||||
romsub $C04B = psg_init() clobbers(A,X,Y)
|
||||
romsub $C063 = ym_init() clobbers(A,X,Y) -> ubyte @Pc ; (re)init YM chip
|
||||
romsub $C066 = ym_loaddefpatches() clobbers(A,X,Y) -> ubyte @Pc ; load default YM patches
|
||||
romsub $C09F = audio_init() clobbers(A,X,Y) -> ubyte @Pc ; (re)initialize PSG and YM audio chips
|
||||
; TODO: add more of the audio routines?
|
||||
|
||||
|
||||
asmsub kbdbuf_clear() {
|
||||
|
@ -1 +1 @@
|
||||
8.11-dev
|
||||
8.11
|
||||
|
@ -438,7 +438,7 @@ private fun transformNewExpressions(program: PtProgram) {
|
||||
var countByteVars = 0
|
||||
var countWordVars = 0
|
||||
var countFloatVars = 0
|
||||
// TODO: find a reliable way to reuse the temp vars across expressions
|
||||
// TODO: find a reliable way to reuse more temp vars across expressions
|
||||
|
||||
fun getExprVar(type: DataType, pos: Position, scope: PtSub): PtIdentifier {
|
||||
val count = when(type) {
|
||||
|
@ -30,7 +30,7 @@ internal class AstOnetimeTransforms(private val program: Program, private val op
|
||||
private fun replacePointerVarIndexWithMemreadOrMemwrite(arrayIndexedExpression: ArrayIndexedExpression, parent: Node): Iterable<IAstModification> {
|
||||
// note: The CodeDesugarer already does something similar, but that is meant ONLY to take
|
||||
// into account the case where the index value is a word type.
|
||||
// The replacement here is to fix missing cases in the 6502 codegen.
|
||||
// The replacement here is to fix missing cases in the 6502 codegen. (VM codegen doesn't use this workaround)
|
||||
// TODO make the 6502 codegen better so this workaround can be removed
|
||||
val arrayVar = arrayIndexedExpression.arrayvar.targetVarDecl(program)
|
||||
if(arrayVar!=null && arrayVar.datatype == DataType.UWORD) {
|
||||
|
@ -109,12 +109,7 @@ internal class NotExpressionAndIfComparisonExprChanger(val program: Program, val
|
||||
if(binExpr==null || binExpr.operator !in ComparisonOperators)
|
||||
return noModifications
|
||||
|
||||
return noModifications // TODO tijdelijk geen simplify
|
||||
|
||||
// Simplify the conditional expression, introduce simple assignments if required.
|
||||
// This is REQUIRED for correct code generation on 6502 because evaluating certain expressions
|
||||
// clobber the handful of temporary variables in the zeropage and leaving everything in one
|
||||
// expression then results in invalid values being compared. VM Codegen doesn't suffer from this.
|
||||
// NOTE: sometimes this increases code size because additional stores/loads are generated for the
|
||||
// intermediate variables. We assume these are optimized away from the resulting assembly code later.
|
||||
val simplify = simplifyConditionalExpression(binExpr)
|
||||
|
@ -83,7 +83,7 @@ irq_handler:
|
||||
lda VERA_ISR
|
||||
and #%00001000 ; is aflow?
|
||||
bne _aflow_irq
|
||||
; TODO other irq
|
||||
; handle other irq here
|
||||
bra _exit_irq
|
||||
|
||||
_aflow_irq:
|
||||
|
@ -146,7 +146,7 @@ main {
|
||||
}
|
||||
|
||||
} else {
|
||||
; TODO not AFLOW, handle other IRQ
|
||||
; it's not AFLOW, handle other IRQ here.
|
||||
}
|
||||
|
||||
;; cx16.vpoke(1,$fa0c, 0) ; back to other screen color
|
||||
|
@ -168,7 +168,7 @@ interrupt {
|
||||
uncompressed_block_8()
|
||||
} else if cx16.VERA_ISR & %00000001 {
|
||||
cx16.VERA_ISR = %00000001
|
||||
; TODO handle vsync irq
|
||||
; handle vsync irq here
|
||||
}
|
||||
|
||||
%asm {{
|
||||
|
@ -13,7 +13,7 @@ main {
|
||||
txt.nl()
|
||||
txt.print_uw(wa[1])
|
||||
txt.nl()
|
||||
floats.print_f(fa[1]) ; TODO FIX FLOAT PRINT IN VM
|
||||
floats.print_f(fa[1])
|
||||
txt.nl()
|
||||
|
||||
ubyte index=1
|
||||
@ -25,7 +25,7 @@ main {
|
||||
txt.nl()
|
||||
txt.print_uw(wa[1])
|
||||
txt.nl()
|
||||
floats.print_f(fa[1]) ; TODO FIX FLOAT PRINT IN VM
|
||||
floats.print_f(fa[1])
|
||||
txt.nl()
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user