Skip to content

Commit

Permalink
3.0.4 release
Browse files Browse the repository at this point in the history
  • Loading branch information
markjfisher committed May 5, 2024
1 parent a46f9cd commit f1d3210
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 35 deletions.
6 changes: 6 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

## [Unreleased]

## [3.0.4] - 2024-05-05

- [apple2] Add appkey support (thanks Eric Carr)
- [cbm] Start of commodore support in fujinet
- [coco] Start of coco support

## [3.0.3] - 2024-04-02

Bugfix release:
Expand Down
18 changes: 9 additions & 9 deletions apple2/src/fn_fuji/fuji_appkey_open.c
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
#include <stdint.h>
#include "../../../fujinet-fuji.h"
#include "../../../fujinet-bus-apple2.h"
#include "fujinet-fuji.h"
#include "fujinet-bus-apple2.h"

uint8_t fuji_appkey_open(AppKeyOpen *buffer)
{
sp_error = sp_get_fuji_id();
sp_error = sp_get_fuji_id();
if (sp_error <= 0) {
return false;
}

sp_payload[0] = 5; // Packet size
sp_payload[1] = 0;
sp_payload[2] = buffer->creator & 0xFF;
sp_payload[0] = 5; // Packet size
sp_payload[1] = 0;
sp_payload[2] = buffer->creator & 0xFF;
sp_payload[3] = (buffer->creator & 0xFF00) >> 8;
sp_payload[4] = buffer->app;
sp_payload[5] = buffer->key;
sp_payload[6] = buffer->mode;
sp_payload[4] = buffer->app;
sp_payload[5] = buffer->key;
sp_payload[6] = buffer->mode;

sp_error = sp_control(sp_fuji_id, 0xDC);
return sp_error == 0;
Expand Down
18 changes: 9 additions & 9 deletions apple2/src/fn_fuji/fuji_appkey_read.c
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
#include <stdint.h>
#include <string.h>
#include "../../../fujinet-fuji.h"
#include "../../../fujinet-bus-apple2.h"
#include "fujinet-fuji.h"
#include "fujinet-bus-apple2.h"

uint8_t fuji_appkey_read(AppKeyRead *buffer)
{
sp_error = sp_get_fuji_id();
sp_error = sp_get_fuji_id();
if (sp_error <= 0) {
return false;
}

sp_error = sp_status(sp_fuji_id, 0xDD);
sp_error = sp_status(sp_fuji_id, 0xDD);
if (sp_error == 0) {
buffer->length = 0;
if (sp_count>0 && sp_count <= MAX_APPKEY_LEN) {
memcpy(buffer->value, &sp_payload[0], sp_count);
buffer->length = sp_count;
}
buffer->length = 0;
if (sp_count>0 && sp_count <= MAX_APPKEY_LEN) {
memcpy(buffer->value, &sp_payload[0], sp_count);
buffer->length = sp_count;
}
}
return sp_error == 0;
}
32 changes: 16 additions & 16 deletions apple2/src/fn_fuji/fuji_appkey_write.c
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
#include <stdint.h>
#include "../../../fujinet-fuji.h"
#include "../../../fujinet-bus-apple2.h"
#include "fujinet-fuji.h"
#include "fujinet-bus-apple2.h"
#include <string.h>

uint8_t fuji_appkey_write(uint16_t count, AppKeyWrite *buffer)
{
sp_error = sp_get_fuji_id();
sp_error = sp_get_fuji_id();

if (sp_error <= 0) {
return false;
}
if (sp_error <= 0) {
return false;
}

sp_payload[0] = 64;
sp_payload[1] = 0;
sp_payload[0] = 64;
sp_payload[1] = 0;

// Sticking with a 64 payload size. Can we use smaller?
memset(&sp_payload[2], 0, 64);
// Sticking with a 64 payload size. Can we use smaller?
memset(&sp_payload[2], 0, 64);

if (count>MAX_APPKEY_LEN)
count = MAX_APPKEY_LEN;
memcpy(&sp_payload[2], buffer, count);
if (count>MAX_APPKEY_LEN)
count = MAX_APPKEY_LEN;

memcpy(&sp_payload[2], buffer, count);

sp_error = sp_control(sp_fuji_id, 0xDE);
return sp_error == 0;
sp_error = sp_control(sp_fuji_id, 0xDE);
return sp_error == 0;
}
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.3
3.0.4

0 comments on commit f1d3210

Please sign in to comment.