Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SCSI ethernet support, emulating a Dayna SCSI/Link #59

Merged
merged 18 commits into from
Oct 12, 2023

Conversation

jcs
Copy link
Contributor

@jcs jcs commented Aug 5, 2023

No description provided.

@erichelgeson
Copy link
Contributor

erichelgeson commented Aug 5, 2023

@jcs jcs force-pushed the jcs/wifi-upstream branch 2 times, most recently from 3b9f2c9 to b2c92b9 Compare August 6, 2023 02:02
@jcs
Copy link
Contributor Author

jcs commented Aug 6, 2023

Added more vendor commands to get wifi status.

I also added a check that we're running on the Pico W before doing any network initialization. If running on a non-W Pico, it just logs a message and ignores the NE# file:

21:03:43:403 -> -- Ignoring /NE4.txt, networking is not supported on this hardware

@jcs jcs force-pushed the jcs/wifi-upstream branch 3 times, most recently from 12fe6bd to 285bb54 Compare August 9, 2023 04:09
@jcs
Copy link
Contributor Author

jcs commented Aug 9, 2023

Fixed booting on the Mac Plus with a workaround, added vendor command to join a new network, changed Dayna driver delay back to 80us which seems to work on the Plus.

Fetch is plugging along downloading a file at 14 kbytes/sec on my Plus with these changes.

For some reason booting still times out when running this through a picoprobe, but if it's run directly it boots fine.

@jcs jcs force-pushed the jcs/wifi-upstream branch from 285bb54 to f3bf614 Compare August 9, 2023 18:47
@jcs
Copy link
Contributor Author

jcs commented Aug 9, 2023

This change uses pico_get_unique_board_id to get the Pico's ID when constructing a default MAC address (if not specified in bluescsi.ini) to avoid having more than one BlueSCSI on a network using the default 00:80:19:c0:ff:ee. From my testing on two Pico Ws, this unique board id persists across firmware reflashes so it should be stable and unique.

From the pico_get_unique_board_id docs:

However, RP2040 boots from serial NOR flash devices which have a 64-bit unique ID as a standard feature, and there is a 1:1 association between RP2040 and flash, so this is suitable for use as a unique identifier for an RP2040-based board.

@jcs jcs force-pushed the jcs/wifi-upstream branch from f3bf614 to a4cc760 Compare August 9, 2023 19:00
@jcs
Copy link
Contributor Author

jcs commented Aug 9, 2023

"Wi-Fi"

@jcs jcs force-pushed the jcs/wifi-upstream branch 2 times, most recently from 8ed63be to bef630b Compare August 10, 2023 15:47
@jcs
Copy link
Contributor Author

jcs commented Aug 10, 2023

These changes do the multicast magic to enable EtherTalk and reorganizes the custom Wi-Fi SCSI commands that the Wi-Fi DA uses. I've given up trying to use custom opcodes in the custom vendor C0-FF range because the SCSI Manager in Mac OS doesn't like it, and am just using one opcode with a sub-command in the CDB for each Wi-Fi command.

@androda
Copy link
Contributor

androda commented Aug 24, 2023

Looks like configuring the INI file but then failing to specify a network device causes a hang and failure to boot.

@jcs
Copy link
Contributor Author

jcs commented Aug 24, 2023

You mean just setting the SSID and password but no NE#.txt file? I'm not seeing how they would have any impact on anything, they are just copied into the global config object during INI parsing and would not be used by anything.

@androda
Copy link
Contributor

androda commented Aug 24, 2023

Correct, that combination caused my beige g3 to not boot. After adding an NE# file the issue was resolved.

@tazounet
Copy link

Thanks for the WiFi support, it works well on my PB100 :)
But it seems to break the ROM disk support (if I switch back to the "official" version, the ROM disk is back).

@erichelgeson
Copy link
Contributor

Sorry for the long delay @tazounet - I can reproduce your issue - we'll look into it. Thanks for the report.

@jcs jcs force-pushed the jcs/wifi-upstream branch from a2a91ae to f037c2d Compare October 9, 2023 21:38
@fdanapfel
Copy link

fdanapfel commented Oct 11, 2023

Thanks for the WiFi support! It also works well on the Atari TT :)

Edit: another report of successfully using the WiFi support on an Atari TT: https://www.atari-forum.com/viewtopic.php?p=452237#p452237

@jcs jcs force-pushed the jcs/wifi-upstream branch from 6343838 to 445c248 Compare October 12, 2023 20:32
@erichelgeson erichelgeson self-requested a review October 12, 2023 22:13
jcs and others added 12 commits October 12, 2023 17:13
Otherwise we panic trying to claim an already-used id
Somehow this broke booting on the Mac Plus, so for now turn them
into no-ops so booting works again
Add SCSI commands to start a Wi-Fi scan, check status, get SSID
list, and switch networks.

To avoid running out of usable opcodes that System 6's SCSI Manager
will properly send, use one op code for all wifi commands and put a
sub-command in cdb[2].
This should speed up freeing the SCSI bus since we're not waiting
for packets to send, but I'm not sure how much it helps.
Support for status LED on both WiFi and non-WiFi boards.
This device is emulating something specific and works on non-Apple
platforms so use it everywhere.
@jcs jcs force-pushed the jcs/wifi-upstream branch from 232d246 to 003b0da Compare October 12, 2023 22:14
Copy link
Contributor

@erichelgeson erichelgeson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛜

@erichelgeson erichelgeson merged commit a590424 into main Oct 12, 2023
1 check passed
@erichelgeson erichelgeson deleted the jcs/wifi-upstream branch October 12, 2023 22:18
morio added a commit to ZuluSCSI/ZuluSCSI-firmware that referenced this pull request Oct 20, 2023
This commit is to recognize the contribution Joshua Stein made to the
BlueSCSI V2 project to create a SCSI DaynaPORT Wi-Fi Ethernet emulator.

@jcs's code was adapted for the ZuluSCSI Pico board for
this project at commit #aa879e35db1e4549cb4a11c87f949fc3edba8554
But wasn't tagged as a co-author. The purpose of this commit is to
recognize the significant effort that went in to writing this code.

The original pull request, which @jcs contributed to BlueSCSI V2,
can be viewed at BlueSCSI/BlueSCSI-v2#59

Co-authored-by: joshua stein <jcs@jcs.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants