output to 80col is disabled... disk access...

Es gibt 5 Antworten in diesem Thema, welches 1.155 mal aufgerufen wurde. Der letzte Beitrag (28. August 2009 um 04:22) ist von MIRKOSOFT.

  • Hi!

    I know it's new thread, but I began programming my program again... it's BASIC 7 extension to disk access commands.
    and first function is prompt.

    The same problem:
    - when I want to print prompt, properly working only in 40col mode (illogical not?), it's used routine $FFD2...
    - when I start it separated all is correctly in 40col also 80col mode

    I'm afraid that my routines to disk access will work not...

    So, what can disable printing in 80col mode when I use BASIC extension? I don't know really what...

    > and: it's first ML program which I'm programming on Commodore 128 (before only Commodore 64) - I let go away KickAssembler 'cause it produces the same problems. So I tried to write it in C128 ML MONITOR. It's hard work, but I think that can help when KickAssembler does problems. But I'm sad that direct programming does the same...

    Thanks for every reply.

    Miro

  • I would try to debug this code in VICE.

    I did so with my VC-20 project and VICE always was a helpful tool.

    Bitte melde dich an, um diesen Link zu sehen. --- Bitte melde dich an, um diesen Link zu sehen. --- Bitte melde dich an, um diesen Link zu sehen.

  • You didn't analyse the original BASIC routines correctly (especially the exit to READY).
    Banking is a very complicated business.

    When you used your original program you missed any output on VDC screen.
    But you can find the remnants of your efforts in RAM 0 at $D600/$D601 (VDC register address)

    Code
    m 0d600 0d600
    >0d600 0f 80 00 00 00 00 00 00:........

    Change all jumps from $16ba to $16b7
    and add one line to your "READY"-exit:

    Code
    d 16b7
    . 016b7  20 45 a8 jsr $a845
    . 016ba  a2 00    ldx #$00
    . 016bc  bd 80 14 lda $1480,x
    . 016bf  c9 01    cmp #$01
    . 016c1  f0 07    beq $16ca
    . 016c3  20 d2 ff jsr $ffd2
    . 016c6  e8       inx
    . 016c7  4c bc 16 jmp $16bc
    . 016ca  60       rts


    Or shift the code from 16ba three bytes down and set the new line as 16ba
    jsr a845 makes MMU conf reg = 0 (Bank 15)

    Why is that necessary for 80 column? (and not for 40 column)

    Writing on VIC-creen is writing in memory => no problem
    Writing to VDC-screen is writing via I/O-Register to external RAM => you need Bank 15

    Executing BASIC-Line (also in READY-Mode) disables I/O and enables Charset/RAM 0 (that's done by the BASIC routine before your extension is executed)
    Your extension sees RAM 0 (Bank 0) and KERNAL/BASIC/CHARSET only. But no I/O.
    You have to reset Bank 15 configuration before printing to VDC!

    That's all.

    Regards WTE

    Bitte melde dich an, um diesen Link zu sehen. --- Bitte melde dich an, um diesen Link zu sehen.

  • Hi!

    Yes I know how to write to VDC, but I didn't knew that if I do BASIC extension some subroutines changes BANK.
    As you could see, first what I do in INIT is switching bank to Bitte melde dich an, um diesen Link zu sehen.. But never knew that in progress can be changed.

    So, I want ask you: before every writting to screen I must call $a845 ?

    And also: you're advanced user, separately (not as BASIC extension) my I/O operation works (like: DIR, FORMAT...), but when I activate extension, works not.
    So my Q is that what to call/change for I/O operations. If needs st. to write before disk access.

    Thank you very very much.

    Miro

  • Hi!

    Thanks for subroutine $a845 - which sets bank to Bitte melde dich an, um diesen Link zu sehen.

    Only call this in BASIC extension and writting to 80col mode is allowed and disk access is correctly!

    Thanks to WTE

    Miro