Raw memory-card sector calls report completion without transferring data
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- c
- Domain
- embedded-iot
Research direction
Read psyz/src/psyz/libcard.c, especially _card_read, _card_write, and card_op, then trace the file level card implementation to understand how media, channels, events, bounds, and persistence are handled. The issue reports that raw calls discard the sector and buffer and do not transfer data; no card test file is named. Done means a successful 128-byte transfer at the requested sector, failure when media is unavailable, and a write/read round trip that preserves the bytes.
Written by the indexing model from the issue text.
Description
In PsyZ 35c673ecf1c4ba799a812d701918c2c52935475b, _card_read and
_card_write explicitly ignore the sector number and data buffer and only call
card_op. Games that inspect the card directory or save blocks through these
APIs cannot use the file-level emulation as a substitute.
Source-confirmed behavior and suggested runtime check
In a disposable card setup, initialize/start the card, fill a 128-byte read
buffer with a sentinel, and issue _card_read(0, 0, buffer). Observe completion
through the normal card event/status mechanism. The current implementation never
copies card bytes into the buffer. Similarly, _card_write never consumes its
input buffer. The relevant bodies are in libcard.c: both discard block and buf, then return card_op(0, chan). For valid non-multitap channels that helper raises HwCARD / EvSpIOE without a transfer.
Expected: successful completion corresponds to a 128-byte transfer at the
requested sector; unavailable media should report failure rather than apparent
successful transfer. A write/read round trip should recover the same bytes.
This packet records a source-confirmed limitation. A standalone card-event
runtime test has not been included; the GPU repro runner does not exercise cards.
Desired scope
Raw sector and file-level views should represent the same card, with consistent
channel selection, sector bounds, completion/error events and persistence. A
browser storage strategy can remain a platform choice. Our port currently uses
a local 128 KiB image as a workaround, but that game-specific wrapper is not a
proposal for PsyZ's public API.
No real saves or card images are needed for a disposable test. Do not run a write
experiment against an existing user's memory card.
- Dominant language
- C
- Stars
- 107
- Forks
- 26
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 5
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Xeeynamo/psyz
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
Difficulty 5/5 Over a week Newbie friendliness 38/100
-
Difficulty 5/5 Over a week Newbie friendliness 38/100
Similar issues
-
documentation good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
Maintainers usually reply within 5 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
JulianKemmerer/PipelineC#409 ·
-
Linux build fails without libspeechd-dev, which INSTALL.md doesn't list and CMake reports as foundOpen
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
GXF: heap buffer overflow in parse_ad_cdp() — unbounded cc_count in CDP cc data sectionPossibly taken @pranayr710 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
CCExtractor/ccextractor#2498 ·
Maintainers usually reply within 1 day