Comments (13)
None of the 3 SCSI CD-ROM drives I've purchased are functional, so I'm looking forward to the MAME release!
from a2d.
Interesting... the code seems to be doing the same thing as the GS/OS 6.0.1 source when sending the AudioSearch command, i.e. setting the first byte of the buffer to signal whether to play or hold.
Line 1715 in 5ea8337
Possibilities are:
- We broke something when disassembling/adapting the code from the original CD player IIe app, and the code is buggy in a subtle way - either near the AudioSearch call or farther upstream.
- It was buggy in the IIe app and no one noticed back in the day. Maybe it got the protocol subtly wrong?
- The MAME emulation is buggy. Listing for completeness. :)
I'll be able to diagnose further once that release of MAME is out, but if you want to see if we're sending AudioSearch with the correct or incorrect params that'd help.
from a2d.
I don't actually handle the search command right now because it's the least understandable one :-) There's an explicit Play being sent somewhere down the line when you click the Track up/down buttons, is all I know. It'd be great if someone had a working drive and could try some things.
from a2d.
Heh, okay. That helps, I'll stare at the code some more.
from a2d.
Does the same thing happen when the N key is pressed? Under the hood, the GUI maps button presses to key presses, and dispatches into the key handling logic. I'm not spotting an issue yet but if the same thing happens with the N key then it at least slightly narrows things down.
from a2d.
I'd be most interested to know if the "original" full-screen P8 CD Remote starts playing if you choose "track up"/"next" from a stopped state. If it does, then the behavior lies in the original code to begin with. I would hope it does not, but I don't recall ever specifically seeing that behavior tested or demonstrated, one way or the other.
My suspicion is that if the playback is being erroneously started, it's probably happening somewhere in the "C20AudioSearch" (line 1690). I have to confess, that was one of the subroutines that I had the most trouble wrapping my head around. I thought I eventually had a pretty good handle on it, but even then I wasn't 100% sure of exactly how it behaves, or is intended to behave, and I never got enough of a compatible system set up to do the deep dive I needed to figure it out fully. The documentation that I was able to find for the AudioSearch SP Control call is absolutely inadequate at best.
That routine (C20AudioSearch) and some of the "Random" play behavior routines near the end were the ones that I ultimately had to just ... assume they worked as-is, and leave them exactly as they were (please note my blunt comments on lines 2308/2396/2399).
from a2d.
Non-update: inspection of the IIgs 6.0.1 source calling #$20 and the original CDREMOTE and our new DA all seem to call it with the same buffer, so it does seem like it's some higher level flow control issue in the code, but I still haven't spotted it yet.
Now that we understand the calls and responses a bit better expanding the FAKE_HARDWARE mode to return dummy data is a possibility, but if we get the emulator soon that'll be easier. :)
from a2d.
Playing with this now. The issue reproduces in the original code https://github.com/a2stuff/cdremote too.
The CD Remote (DA here and original) just send #$20 (AudioSearch) when next/prev track is selected, whether playing or not. They don't send a subsequent AudioPlay command - I can BRK right after the Nth search and the playing starts up in MAME. If I explicitly send an AudioStop (assuming we're not playing) then it behaves.
When you mention "I don't actually handle the search command right now because it's the least understandable one" is the code just falling through to an AudioPlay or something? The parameters (looking at ASeekTrack in the IIgs code spdriver.aii) seem to be:
- buffer+0: $00 = hold, $01 = play
- buffer+1: play mode, $09 = stereo
- buffer+2: track (BCD)
- buffer+3: zero
- buffer+4: zero
- buffer+5: zero
- buffer+6: $02 (address type - track number)
It seems like the first byte (buffer+0) is being ignored and play is initiated regardless.
If it helps here are videos of someone using the original remote on real hardware:
https://www.youtube.com/watch?v=loXFF4MgP24
And here's our CD Remote. You can see the scenario here being exercised - with playback stopped, the Next Track button is hit and playback doesn't start automatically.
https://www.youtube.com/watch?v=m8VFkwpGVOM
EDIT: buffer addresses above seem to be equivalent to scsi_cmdbuf
offsets -3 (so scsi_cmdbuf[5]
is buffer+2, etc)
from a2d.
Also, it seems on startup that the remote is detecting (via a status query) that the CD is actively playing. This can be worked around by sending an explicit stop but this is not necessary on real hardware, so far as I can tell.
from a2d.
FYI the original CD Remote which gets more video air time: https://mirrors.apple2.org.za/ftp.apple.asimov.net/images/hardware/storage/disk/misc/Apple%20II%20CD%20Setup.dsk
from a2d.
Hmmm, and confusingly - if CD audio is currently playing then $20 AudioSearch stops audio, regardless of the state of the first buffer byte.
from a2d.
Oh hey @rb6502 - hopefully you're typing an update somewhere. :) I was starting to look into the MAME code but if you've got an update coming let me know!
from a2d.
Checking in @rb6502 - I'm assuming you closed this because you agree this is an emulation issue, but if I'm wrong please let me know. If it is an emulation issue, is there a pending fix for MAME? Or do we need to do research, and if so how can we help?
from a2d.
Related Issues (20)
- Display corrupted when returning from //GS Apps HOT 3
- Image preview causes crash to monitor HOT 1
- Disk Copy causes A2Stream not to work HOT 1
- Add Dutch localization HOT 2
- Rectangle inverted after dismissing alert HOT 1
- Previous lines of text disappears while scrolling down a text file in "Fixed" font HOT 3
- Monochrome mode broken on IIe Card HOT 7
- OpenApple-O not opening folder
- Scroll position adjusts even if thumb not moved HOT 4
- v1.4-alpha builds hang at startup in Crossrunner HOT 5
- Options control panel causes basic.system to crash HOT 1
- Sounds DA causes BASIC.SYSTEM to hang HOT 1
- Show.Text.File's Proportional/Fixed label baseline is 1px too high
- Replace thin apple glyph in menu bar with a fatter, more realistic Apple logo HOT 1
- Selector crash when loading with ProDos 2.4.3 HOT 13
- List view items paint as NON / 32,768 / No Date after showing/closing Shortcuts dialogs HOT 1
- horizontal scroll viewable area is too large in file type view HOT 3
- Suggestion: replace main font with a font that is more readable HOT 23
- Suggestion: reduce the vertical spacing of fonts in menu and item spacers HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from a2d.