From c68cefcab03a22fa53f4f254027bac91e0b20951 Mon Sep 17 00:00:00 2001 From: marcobaye Date: Mon, 29 Jul 2019 14:24:33 +0000 Subject: [PATCH] ACME_Lib: minor tweaks git-svn-id: https://svn.code.sf.net/p/acme-crossass/code-0/trunk@116 4df02467-bbd4-4a76-a152-e7ce94205b78 --- ACME_Lib/cbm/264/ted.a | 15 +++++++++++++-- ACME_Lib/cbm/c64/cia2.a | 8 ++++---- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/ACME_Lib/cbm/264/ted.a b/ACME_Lib/cbm/264/ted.a index 0c2d1b8..92367df 100644 --- a/ACME_Lib/cbm/264/ted.a +++ b/ACME_Lib/cbm/264/ted.a @@ -91,7 +91,18 @@ lib_cbm_264_ted_a = 1 tedhorz_SMOOTH = %.....### ; horizontal smooth scroll (std: %000, higher values move text right) ; i/o - ted_keyboard = ted_base + $08 ; keyboard input latch + ted_keyboard = ted_base + $08 ; keyboard input latch (write to trigger sampling, then read input byte) + ; to scan keyboard, write output byte to $fd30, then write $ff here (to disable joysticks) and read input byte. + ; to scan joysticks, write $ff to $fd30 (to disable keyboard), then write SELECT value here and read input byte. + tedjoy1_SELECT = %#####.## ; d2 low selects joy #1 + tedjoy2_SELECT = %######.# ; d1 low selects joy #2 + ; CAUTION, the joystick bits are low-active, so invert input byte before using these: + tedjoy2_FIRE = %#....... + tedjoy1_FIRE = %.#...... + tedjoy_RIGHT = %....#... + tedjoy_LEFT = %.....#.. + tedjoy_DOWN = %......#. + tedjoy_UP = %.......# ; interrupts ted_irq = ted_base + $09 ; interrupt request register (write back its value to acknowledge interrupt) @@ -114,7 +125,7 @@ lib_cbm_264_ted_a = 1 ted_hwcursor_lo = ted_base + $0d ; hardware cursor offset (low byte) ; sound - ; to calculated the register values: + ; to calculate the register values: ; NTSC: reg = 1024 - (111860.781 / frequency_in_Hz) ; PAL: reg = 1024 - (111840.45 / frequency_in_Hz) ted_sound1_low = ted_base + $0e ; low 8 bits of voice #1 frequency diff --git a/ACME_Lib/cbm/c64/cia2.a b/ACME_Lib/cbm/c64/cia2.a index bbabba3..1eee23e 100644 --- a/ACME_Lib/cbm/c64/cia2.a +++ b/ACME_Lib/cbm/c64/cia2.a @@ -9,11 +9,11 @@ lib_cbm_c64_cia2_a = 1 cia2_pra = cia2_base + cia_port_a ; %7....... DATA in (0 means GND) ; %.6...... CLK in (0 means GND) - ; %..5..... DATA out (inverted, 1 means GND) - ; %...4.... CLK out (inverted, 1 means GND) - ; %....3... ATN out (inverted, 1 means GND) + ; %..5..... DATA out (gets inverted, so 1 means GND) + ; %...4.... CLK out (gets inverted, so 1 means GND) + ; %....3... ATN out (gets inverted, so 1 means GND) ; %.....2.. PA2 (pin M at user port, 0 means GND) - ; %......10 VIC bank (inverted, so value %11 means address $0000) + ; %......10 VIC bank (gets inverted, so value %11 means address $0000) cia2_prb = cia2_base + cia_port_b cia2_ddra = cia2_base + cia_data_direction_a cia2_ddrb = cia2_base + cia_data_direction_b