Compare commits
9
Commits
840c5f1b61
...
7ee9d164e2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7ee9d164e2 | ||
|
|
51a2a43520 | ||
|
|
ec7707d4cc | ||
|
|
74ef17d292 | ||
|
|
b95a6ff057 | ||
|
|
f1df180bf8 | ||
|
|
340bbefd06 | ||
|
|
29124377fc | ||
|
|
264e9792a5 |
No files matched your search
@@ -1,9 +1,9 @@
|
|||||||
This is a modified version of MEGA65 Open ROMs (https://github.com/MEGA65/open-roms),
|
This is a modified version of MEGA65 Open ROMs (https://github.com/MEGA65/open-roms),
|
||||||
forked at upstream commit ad178dbe4d48cd6a317737a8e0e7e662f7e33d32.
|
forked at upstream commit ad178dbe4d48cd6a317737a8e0e7e662f7e33d32.
|
||||||
|
|
||||||
Modified by Christian Werner, 2026-10-14, for the mc64 computers of arnitech, a set of
|
Modified by Christian Werner, 2026-10-14 and 2026-10-15, for the mc64 computers of
|
||||||
Minecraft mods (https://git.susdog.de/chris/arnitech). The fork lives at
|
arnitech, a set of Minecraft mods (https://git.susdog.de/chris/arnitech). The fork lives
|
||||||
https://git.susdog.de/chris/open-roms, branch mc64.
|
at https://git.susdog.de/chris/open-roms, branch mc64.
|
||||||
|
|
||||||
Changes:
|
Changes:
|
||||||
|
|
||||||
@@ -11,6 +11,18 @@ Changes:
|
|||||||
own config ID ($6D), the brand "MC64", and BCD_SAFE_INTERRUPTS turned off.
|
own config ID ($6D), the brand "MC64", and BCD_SAFE_INTERRUPTS turned off.
|
||||||
- Makefile: targets for that configuration, build/kernal_mc64.rom and build/basic_mc64.rom,
|
- Makefile: targets for that configuration, build/kernal_mc64.rom and build/basic_mc64.rom,
|
||||||
made the same way as the c64 ones.
|
made the same way as the c64 ones.
|
||||||
|
- src/kernal/iec/ciout.s (2026-10-15): CIOUT buffers its byte in TBTCNT, where the send
|
||||||
|
routine takes it from, not in BSOUR (upstream PR #113).
|
||||||
|
- src/kernal/iec/close_iec.s (2026-10-15): CLOSE sends LISTEN, $E0 plus the secondary
|
||||||
|
address, and UNLISTEN; it sent a command ORed with zero page $E0 and no LISTEN.
|
||||||
|
- src/kernal/iec/chkin_iec.s, ckout_iec.s (2026-10-15): CHKIN and CHKOUT take the secondary
|
||||||
|
address from SAT, not from LAT, the logical file numbers.
|
||||||
|
- src/kernal/iec/tksa.s (2026-10-15): TKSA sends the secondary address it is given, without
|
||||||
|
ORing $90 into it (upstream issue #116).
|
||||||
|
- src/kernal/iec/iec_tx_byte.s (2026-10-15): a data byte that no listener holds DATA for
|
||||||
|
sets ST to $80 (device not present) and returns, instead of waiting forever.
|
||||||
|
- src/kernal/iec/close_iec.s (2026-10-15): a CLOSE that finds no device sets ST to $80
|
||||||
|
(device not present), and still frees the file number.
|
||||||
- NOTICE: this file.
|
- NOTICE: this file.
|
||||||
|
|
||||||
The licence terms are unchanged; see LICENSE, COPYING, and COPYING.LESSER.
|
The licence terms are unchanged; see LICENSE, COPYING, and COPYING.LESSER.
|
||||||
@@ -14,7 +14,7 @@ chkin_iec:
|
|||||||
|
|
||||||
; Fail if the file is open for writing (secondary address 1)
|
; Fail if the file is open for writing (secondary address 1)
|
||||||
|
|
||||||
lda LAT, Y
|
lda SAT, Y
|
||||||
cmp #$01
|
cmp #$01
|
||||||
+beq chkin_file_not_input
|
+beq chkin_file_not_input
|
||||||
|
|
||||||
@@ -24,7 +24,7 @@ chkin_iec:
|
|||||||
jsr TALK
|
jsr TALK
|
||||||
+bcs chkinout_device_not_present
|
+bcs chkinout_device_not_present
|
||||||
|
|
||||||
lda LAT, Y
|
lda SAT, Y
|
||||||
ora #$60
|
ora #$60
|
||||||
jsr TKSA
|
jsr TKSA
|
||||||
+bcs chkinout_device_not_present
|
+bcs chkinout_device_not_present
|
||||||
|
|||||||
@@ -28,9 +28,10 @@ CIOUT:
|
|||||||
|
|
||||||
ciout_store_in_buffer:
|
ciout_store_in_buffer:
|
||||||
|
|
||||||
; Store in the buffer data to be sent next, return
|
; Store in the buffer data to be sent next, return; iec_tx_byte
|
||||||
|
; sends the byte from TBTCNT, so that is our buffer, not BSOUR
|
||||||
pla
|
pla
|
||||||
sta BSOUR
|
sta TBTCNT
|
||||||
rts
|
rts
|
||||||
|
|
||||||
ciout_send_byte:
|
ciout_send_byte:
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ ckout_iec:
|
|||||||
|
|
||||||
; Fail if the file is open for reading (secondary address 0)
|
; Fail if the file is open for reading (secondary address 0)
|
||||||
|
|
||||||
lda LAT, Y
|
lda SAT, Y
|
||||||
+beq ckout_file_not_output
|
+beq ckout_file_not_output
|
||||||
|
|
||||||
; Send LISTEN + SECOND first
|
; Send LISTEN + SECOND first
|
||||||
@@ -23,7 +23,7 @@ ckout_iec:
|
|||||||
jsr LISTEN
|
jsr LISTEN
|
||||||
+bcs chkinout_device_not_present
|
+bcs chkinout_device_not_present
|
||||||
|
|
||||||
lda LAT, Y
|
lda SAT, Y
|
||||||
ora #$60
|
ora #$60
|
||||||
jsr SECOND
|
jsr SECOND
|
||||||
+bcs chkinout_device_not_present
|
+bcs chkinout_device_not_present
|
||||||
|
|||||||
@@ -23,11 +23,23 @@ close_iec:
|
|||||||
jsr iec_close_load
|
jsr iec_close_load
|
||||||
jmp close_remove_from_table
|
jmp close_remove_from_table
|
||||||
@1:
|
@1:
|
||||||
ora $E0 ; CLOSE command
|
; LISTEN, CLOSE, UNLISTEN - see https://www.pagetable.com/?p=1031
|
||||||
|
lda FAT, y
|
||||||
|
jsr LISTEN
|
||||||
|
bcs close_iec_not_present
|
||||||
|
lda SAT, y
|
||||||
|
ora #$E0 ; CLOSE command
|
||||||
sta TBTCNT
|
sta TBTCNT
|
||||||
jsr iec_tx_command
|
jsr iec_tx_command
|
||||||
bcs close_iec_end
|
bcs close_iec_not_present
|
||||||
jsr iec_tx_command_finalize
|
jsr iec_tx_command_finalize
|
||||||
|
jsr UNLSN
|
||||||
|
jmp close_remove_from_table
|
||||||
|
|
||||||
|
close_iec_not_present:
|
||||||
|
|
||||||
|
; The file is closed all the same; READST says device not present
|
||||||
|
jsr kernalstatus_DEVICE_NOT_FOUND
|
||||||
|
|
||||||
; FALLTROUGH
|
; FALLTROUGH
|
||||||
|
|
||||||
|
|||||||
@@ -51,6 +51,17 @@ iec_tx_byte:
|
|||||||
+phx_trash_a
|
+phx_trash_a
|
||||||
+phy_trash_a
|
+phy_trash_a
|
||||||
|
|
||||||
|
; A listener holds DATA until we release CLK; if nobody pulls it
|
||||||
|
; within 256us, no device is present - see https://www.pagetable.com/?p=1135
|
||||||
|
ldx #$18
|
||||||
|
@0:
|
||||||
|
lda CIA2_PRA
|
||||||
|
bpl @1 ; branch if DATA is pulled
|
||||||
|
dex
|
||||||
|
bne @0
|
||||||
|
jsr kernalstatus_DEVICE_NOT_FOUND
|
||||||
|
jmp iec_return_DEVICE_NOT_FOUND
|
||||||
|
@1:
|
||||||
; Notify all devices that we are going to send a byte
|
; Notify all devices that we are going to send a byte
|
||||||
; and it is going to be a data byte (released ATN)
|
; and it is going to be a data byte (released ATN)
|
||||||
jsr iec_release_atn_clk_data
|
jsr iec_release_atn_clk_data
|
||||||
|
|||||||
@@ -28,8 +28,6 @@ TKSA:
|
|||||||
; - https://www.lemon64.com/forum/viewtopic.php?t=57694&sid=531ba3592bcffadef2ac8b9162f2e529
|
; - https://www.lemon64.com/forum/viewtopic.php?t=57694&sid=531ba3592bcffadef2ac8b9162f2e529
|
||||||
; - https://www.pagetable.com/?p=1031 (Kernal API description)
|
; - https://www.pagetable.com/?p=1031 (Kernal API description)
|
||||||
|
|
||||||
ora #$90
|
|
||||||
|
|
||||||
jmp common_untlk_tksa
|
jmp common_untlk_tksa
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in new issue
Block a user