Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
1e9dedf
Eliminate a bunch of warnings.
FozzTexx Oct 17, 2024
4fda1dc
Merge branch 'master' into fix-warnings
FozzTexx Oct 19, 2024
5b172b7
There doesn't seem to be a contains() method in std::string
FozzTexx Oct 19, 2024
d8c12bc
Merge branch 'master' into fix-warnings
FozzTexx Oct 20, 2024
215dc33
Use commit date instead of newest modified file date by default.
FozzTexx Oct 20, 2024
3f7921f
Merge branch 'master' into fix-warnings
FozzTexx Oct 22, 2024
2818f3f
Print IEC transfer speed.
FozzTexx Oct 26, 2024
a1eca6b
Clarify which pins are used for IEC on Lolin D32
FozzTexx Oct 27, 2024
fde098b
There is no up/down/pull/true/false/high/low/0/1, only assert/release.
FozzTexx Oct 27, 2024
4bf02ee
Start moving IEC bus access and state management out of virtual devices.
FozzTexx Oct 29, 2024
872069b
Make IEC state private and move IEC access macros to _protocol.h
FozzTexx Oct 29, 2024
94ab41a
Speed up transfer.
FozzTexx Oct 31, 2024
30a0d03
Don't blindly read past end of D64 sector.
FozzTexx Nov 1, 2024
1b33164
Whitespace cleanup.
FozzTexx Nov 6, 2024
a1f31db
Put state machine into cbm_on_clk_isr_handler()
FozzTexx Nov 2, 2024
64d8e9a
Add dynamic delaying before starting transfer.
FozzTexx Nov 8, 2024
ed4e527
JiffyDOS.
FozzTexx Nov 8, 2024
cbf247f
Remove unused functions.
FozzTexx Nov 8, 2024
6f3e087
Don't set bus idle when there's no current command.
FozzTexx Nov 8, 2024
231a43a
Merge branch 'master' into privatize-iec
FozzTexx Nov 9, 2024
ea40235
Remove COMPLEX_WAIT ifdef
FozzTexx Nov 9, 2024
34dcdf6
Remove legacy IEC_ASSERT_RELEASE_AS_FUNCTIONS
FozzTexx Nov 9, 2024
cdc3cd7
Don't send command on EOI, wait for unlisten.
FozzTexx Nov 11, 2024
7b75812
Don't releaseLines() until ATN is released.
FozzTexx Nov 11, 2024
d72cef2
Don't try to do secondary command if there's no primary command.
FozzTexx Nov 11, 2024
36fb501
Don't discard bytes during LISTEN.
FozzTexx Nov 11, 2024
5dc96ae
Release lines immediately on LISTEN.
FozzTexx Nov 12, 2024
0913c87
Set state to BUS_IDLE when releasing lines.
FozzTexx Nov 12, 2024
9739551
Fix problems with transferDelaySinceLast()
FozzTexx Nov 12, 2024
f98b1bf
Merge branch 'master' into privatize-iec
FozzTexx Nov 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 6 additions & 17 deletions include/cbm_defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ typedef enum
#define CLEAR 0x0000 // clear all flags
#define CLEAR_LOW 0xFF00 // clear low byte
#define ERROR (1 << 0) // if this flag is set, something went wrong
#define ATN_PULLED (1 << 1) // might be set by iec_receive
#define ATN_ASSERTED (1 << 1) // might be set by iec_receive
#define EOI_RECVD (1 << 2)
#define EMPTY_STREAM (1 << 3)

Expand All @@ -161,7 +161,7 @@ typedef enum

#define TIMING_Ts 70 // BIT SET-UP TALKER 71us 20us 70us -
#define TIMING_Ts0 40 // BIT SET-UP LISTENER PRE 57us 47us
#define TIMING_Ts1 35 // BIT SET-UP LISTENER POST 18us 24us
#define TIMING_Ts1 30 // BIT SET-UP LISTENER POST 18us 24us
#define TIMING_Tv 20 // DATA VALID VIC20 76us 26us 20us 20us - (Tv and Tpr minimum must be 60μ s for external device to be a talker. )
#define TIMING_Tv64 80 // DATA VALID C64

Expand All @@ -187,9 +187,9 @@ typedef enum

// OTHER
#define TIMING_EMPTY 512 // SIGNAL EMPTY STREAM
#define TIMEOUT_ATNCLK 70 // WAIT FOR CLK AFTER ATN IS PULLED
#define TIMEOUT_ATNCLK 70 // WAIT FOR CLK AFTER ATN IS ASSERTED
#define TIMEOUT_Ttlta 65 // TALKER/LISTENER TURNAROUND TIMEOUT
#define TIMING_Ttcp 13 // TALKER TURNAROUND CLOCK PULL
#define TIMING_Ttcp 13 // TALKER TURNAROUND CLOCK ASSERT

// SPECIAL
#define TIMING_PROTOCOL_DETECT 218 // SAUCEDOS/JIFFYDOS CAPABLE DELAY
Expand All @@ -200,18 +200,7 @@ typedef enum
#define TIMED_OUT -1
#define FOREVER 5000000 // 0

#ifndef IEC_INVERTED_LINES
// Not Inverted
#define PULLED true
#define RELEASED false
#define LOW 0x00
#define HIGH 0x01
#else
// Inverted
#define PULLED false
#define RELEASED true
#define LOW 0x01
#define HIGH 0x00
#endif
#define IEC_ASSERTED true
#define IEC_RELEASED false

#endif // CBMDEFINES_H
2 changes: 2 additions & 0 deletions include/pinmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
#define PINMAP_H

#ifdef ESP_PLATFORM
#include <hal/gpio_types.h>

#include "pinmap/a2_fn10.h"
#include "pinmap/a2_rev0.h"
#include "pinmap/a2_d32pro.h"
Expand Down
18 changes: 4 additions & 14 deletions include/pinmap/iec-d32pro.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,28 +42,18 @@
#define PIN_LED_BT GPIO_NUM_5 // LOLIN D32 PRO
#endif

/* Audio Output */
#define PIN_DAC1 GPIO_NUM_25 // samlib.h

/* Commodore IEC Pins */
#define IEC_HAS_RESET // Reset line is available

#define PIN_IEC_RESET GPIO_NUM_34
#define PIN_IEC_ATN GPIO_NUM_32
#define PIN_IEC_CLK_IN GPIO_NUM_33
#define PIN_IEC_CLK_OUT GPIO_NUM_33
#define PIN_IEC_CLK_OUT PIN_IEC_CLK_IN
#define PIN_IEC_DATA_IN GPIO_NUM_25
#define PIN_IEC_DATA_OUT GPIO_NUM_25
#define PIN_IEC_DATA_OUT PIN_IEC_DATA_IN
#define PIN_IEC_SRQ GPIO_NUM_26

/* Color Computer */
#define PIN_CASS_MOTOR GPIO_NUM_34 // Second motor pin is tied to +3V
#define PIN_CASS_DATA_IN GPIO_NUM_33
#define PIN_CASS_DATA_OUT GPIO_NUM_26

#define PIN_SERIAL_CD GPIO_NUM_32
#define PIN_SERIAL_RX GPIO_NUM_9 // fnUartBUS
#define PIN_SERIAL_TX GPIO_NUM_10
#define PIN_DEBUG PIN_IEC_SRQ

#endif // PINMAP_IEC_D32PRO
#endif // PINMAP_LOLIN_D32_PRO_H
#endif // PINMAP_LOLIN_D32_PRO_H
Loading