Skip to content

Commit baa36cf

Browse files
committed
Preparing Alpha 1.02 release
1 parent ccea8ae commit baa36cf

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

devices/sound/awacs.cpp

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,8 @@ int AwacsScreamer::device_postinit() {
185185
}
186186

187187
uint32_t AwacsScreamer::snd_ctrl_read(uint32_t offset, int size) {
188+
uint32_t return_val = 0;
189+
188190
switch (offset) {
189191
case AWAC_SOUND_CTRL_REG:
190192
return this->snd_ctrl_reg;
@@ -193,7 +195,13 @@ uint32_t AwacsScreamer::snd_ctrl_read(uint32_t offset, int size) {
193195
case AWAC_CODEC_STATUS_REG:
194196
return (AWAC_AVAILABLE << 8) | (AWAC_MAKER_CRYSTAL << 16) | (AWAC_REV_SCREAMER << 20);
195197
case AWAC_CLIP_COUNT:
196-
return this->clip_count;
198+
return_val = this->clip_count;
199+
this->clip_count = 0;
200+
return return_val;
201+
case AWAC_BYTE_SWAP:
202+
return this->byte_swap ? 0 : 1;
203+
case AWAC_FRAME_COUNT:
204+
return this->frame_count;
197205
default:
198206
LOG_F(ERROR, "%s: unsupported register at offset 0x%X", this->name.c_str(), offset);
199207
}
@@ -221,6 +229,10 @@ void AwacsScreamer::snd_ctrl_write(uint32_t offset, uint32_t value, int size) {
221229
break;
222230
case AWAC_CLIP_COUNT:
223231
this->clip_count = BYTESWAP_32(value);
232+
case AWAC_BYTE_SWAP:
233+
this->byte_swap = BYTESWAP_32(value);
234+
case AWAC_FRAME_COUNT:
235+
this->frame_count = BYTESWAP_32(value);
224236
default:
225237
LOG_F(ERROR, "%s: unsupported register at offset 0x%X", this->name.c_str(),
226238
offset);

devices/sound/awacs.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ enum {
9797
AWAC_CODEC_STATUS_REG = 0x20,
9898
AWAC_CLIP_COUNT = 0x30,
9999
AWAC_BYTE_SWAP = 0x40,
100+
AWAC_FRAME_COUNT = 0x50,
100101
};
101102

102103
/** Apple source calls this kValidData but doesn't explain
@@ -189,6 +190,8 @@ class AwacsScreamer : public MacioSndCodec {
189190
uint16_t control_regs[8] = {}; // control registers, each 12-bits wide
190191
uint8_t is_busy = 0;
191192
uint32_t clip_count = 0;
193+
uint32_t byte_swap = 0;
194+
uint32_t frame_count = 0;
192195

193196
std::unique_ptr<AudioProcessor> audio_proc;
194197
};

main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ static void sigabrt_handler(int signum) {
6262
}
6363

6464
static string appDescription = string(
65-
"\nDingusPPC - Alpha 1.02 (5/10/2025) "
65+
"\nDingusPPC - Alpha 1.02 (3/14/2025) "
6666
"\nWritten by divingkatae, maximumspatium, "
6767
"\njoevt, mihaip, kkaisershot, et. al. "
6868
"\n(c) 2018-2024 The DingusPPC Dev Team. "

0 commit comments

Comments
 (0)