Skip to content

Conversation

@tschak909
Copy link
Contributor

At @FozzTexx ask, implement get and set host prefixes for all current lib targets.

Apple still needs addit'l commands in firmware added for get host prefix.

@FozzTexx
Copy link
Contributor

FozzTexx commented Jul 4, 2025

Apple still needs addit'l commands in firmware added for get host prefix.

To add the host prefix stuff to Apple II on my unified fuji device branch, all I had to do was add these 3 lines to iwmFuji:

+        { FUJICMD_GET_HOST_PREFIX, [this]()            { this->fujicmd_get_host_prefix(data_buf
fer[0]); }},                  // 0xE0
+        { FUJICMD_SET_HOST_PREFIX, [this]()            { this->fujicmd_set_host_prefix(data_buf
fer[0], (const char *) &data_buffer[1]); }},          // 0xE1
+        { FUJICMD_GET_HOST_PREFIX, [this]()            { }},                  // 0xE0

@tschak909 tschak909 requested a review from markjfisher August 18, 2025 18:30
@tschak909 tschak909 added the enhancement New feature or request label Aug 18, 2025
unsigned char hs;
} ghp;

memset(response,0,sizeof(response));
Copy link
Contributor

@markjfisher markjfisher Aug 18, 2025

Choose a reason for hiding this comment

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

this isn't required anymore, the values are immediately set

{
// Not implemented in A2
return false;
// Not implemented in A2
Copy link
Contributor

@markjfisher markjfisher Aug 18, 2025

Choose a reason for hiding this comment

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

remove the comment

bool is_success;
int bytes_read;

filename = malloc(256);
Copy link
Contributor

@markjfisher markjfisher Aug 18, 2025

Choose a reason for hiding this comment

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

I've avoided using malloc in library. it pulls a huge chunk of cc65 into the application and is much better just using a static array.


pl_len = strlen(prefix) + 3 + 1; // add 1 for the null string terminator, although technically not required as we go by lengths

pl = malloc(pl_len);
Copy link
Contributor

@markjfisher markjfisher Aug 18, 2025

Choose a reason for hiding this comment

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

ditto (just trying to tag them all)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants