forked from notaz/picodrive
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
92 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,33 @@ | ||
/* | ||
* PicoDrive | ||
* (C) irixxxx, 2024 | ||
* | ||
* MEGASD enhancement support as "documented" in "MegaSD DEV Manual Rev.2" | ||
*/ | ||
|
||
struct megasd { | ||
// modifiable fields visible through the interface | ||
u16 data[0x800/2]; | ||
u16 command; | ||
u16 result; | ||
|
||
extern u16 msd_command, msd_result; | ||
extern u16 msd_data[0x800/2]; | ||
// internal state | ||
s8 initialized; // CD drive has been initialized | ||
|
||
extern void msd_update(void); | ||
extern void msd_process(u16 d); | ||
extern void msd_reset(void); | ||
s8 loop; // playback should loop? | ||
s16 index; // >= 0 if playing audio | ||
s32 startlba, endlba, looplba; // lba's for playback | ||
|
||
extern void msd_write8(u32 a, u32 d); | ||
s32 readlba; // >= 0 if reading data | ||
|
||
s32 pad[8]; | ||
}; | ||
|
||
extern struct megasd Pico_msd; | ||
|
||
|
||
extern void msd_update(void); // 75Hz update, like CDD irq | ||
extern void msd_reset(void); // reset state | ||
|
||
extern void msd_write8(u32 a, u32 d); // interface | ||
extern void msd_write16(u32 a, u32 d); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters