Skip to content

Fixes CD disk stacks#3593

Open
BingusSS13 wants to merge 4 commits into
wiremod:masterfrom
BingusSS13:fix-cd-stacks
Open

Fixes CD disk stacks#3593
BingusSS13 wants to merge 4 commits into
wiremod:masterfrom
BingusSS13:fix-cd-stacks

Conversation

@BingusSS13

Copy link
Copy Markdown

Trying to use the other stacks on CD disks is like completely broken.

Large disk, you can't use the fourth stack.
Medium disk, you can't use the first and fourth stack.
Small disk, you can only use the third stack.

This will (hopefully) fix that issue.
I've tested this with different disk models like circle4x4 and it seems to work fine.

@BingusSS13

Copy link
Copy Markdown
Author

I might be a bit stupid because it genuinely took me a day to figure this out

@AlexALX

AlexALX commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

this fixes only usage of tracks or also alters what disk report in reader information? because not sure if this change will broke cd drive in my alx e2 pc & os as well.

@BingusSS13

Copy link
Copy Markdown
Author

im not entirely sure if it would break your cd drive or not but you can download my branch and test it if you'd like to

@Astralcircle

Copy link
Copy Markdown
Contributor

@AlexALX yea, it would be great if this was tested, my main concern is that this PR could break something

@BingusSS13

Copy link
Copy Markdown
Author

Maybe I could add a "legacy mode" input to the CD ray that switches it to use the old logic for CD stacks?

@thegrb93

thegrb93 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

It would be helpful if there was a diagram showing what changed. If the old behavior didn't even work then there's no point in supporting it.

@BingusSS13

Copy link
Copy Markdown
Author
image

This is the OBB, which the old behavior uses for StackStartHeight. There's extra space on the top and bottom of the OBB.
This is a problem because we're using a trace for the hit position, and I believe traces use AABBs (or some other type of bounding box), which do not have this extra space. This messes with the old behavior for disk stacks.

Here is the AABB:
image

@BingusSS13

BingusSS13 commented Jul 9, 2026

Copy link
Copy Markdown
Author

old behavior
image

@BingusSS13

BingusSS13 commented Jul 9, 2026

Copy link
Copy Markdown
Author

new behavior
image

@AlexALX

AlexALX commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Can you remind me how we change stacks when we need read for example stack 3 ? in my system i have two sides reader, one on bottom, one on top, and reading stacks, but not remember how

@BingusSS13

Copy link
Copy Markdown
Author

Can you remind me how we change stacks when we need read for example stack 3 ? in my system i have two sides reader, one on bottom, one on top, and reading stacks, but not remember how

You have to lower the ray emitter into the disk
image

@Astralcircle

Astralcircle commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

So this does change the broken behavior. You need to add a Legacy setting that will be disabled by default on new cd disks

@BingusSS13

BingusSS13 commented Jul 9, 2026

Copy link
Copy Markdown
Author

So this does change the broken behavior. You need to add a Legacy setting that will be disabled by default on new cd disks

Should this be an option when creating the cd ray or a wire input?
I feel like it should be a wire input, but I just want to be sure.

Also, what should I name the option? "LegacyStacks"?

image

@thegrb93

thegrb93 commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

I'm against supporting the legacy behavior. People can update their dupes.

@AlexALX

AlexALX commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

well, just need to test this change in some free day to see how it works... but if it broke for example "dual-side" reading behavior then thats huge change.. + moving vertically cd ray another hard part for automated work like on my pc

@Bilbard

Bilbard commented Jul 12, 2026

Copy link
Copy Markdown

Excuse me for dropping in, but why are we reading stacks by moving the ray into the disc in the first place? At this point wouldn't it be way better for everyone if stacks were swapped with a simple input/memory address? You could even maintain automatic backwards compatibility by leaving the broken method of reading stacks as it is when the stack input is 0.

@BingusSS13

Copy link
Copy Markdown
Author

At this point wouldn't it be way better for everyone if stacks were swapped with a simple input/memory address?

Fair, if the maintainers agree I'll do that instead.

@thegrb93

thegrb93 commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

No, and I'm getting the feeling @AlexALX isn't going to bother testing anytime soon, so I don't see any reason to keep legacy broken stack behavior.

@AlexALX

AlexALX commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Well whatever you guys want, just if someone can test at least one thing - if place ray at top of disk, does it will read "stack 4" and not "stack 1" ? if reading from top is not possible now at all - then its not just broken stack behavior, its removing one of features.

Like on this image (see second cd ray at top):
https://i.imgur.com/19XToDv.jpeg

its aka "double-sided disk"

@BingusSS13

Copy link
Copy Markdown
Author

I'm pretty sure you can read from both the top and bottom at the same time yeah

@BingusSS13

Copy link
Copy Markdown
Author
20260713195100_1

@AlexALX

AlexALX commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

well then thats good, just tested a bit, and it changes stack # (which is right), but how exactly read stack 1 in this situation? moving cd raw closer to disk does nothing. so i my tests just changed stack numbers but nothing else.

@BingusSS13

BingusSS13 commented Jul 14, 2026

Copy link
Copy Markdown
Author

The ray has to be moved inside of the disk, not just closer

20260714123930_1

@AlexALX

AlexALX commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

then this design is awful, who will move cd ray inside physical object, it has to be done on focus distance between disk and cd ray, imho

anyway its not related to this pull request so if it only changes # of stack compared to old legacy way - then guess not a big issue, as long as i'll update my pc anyway later, besides that old written disks will lost data

@BingusSS13

Copy link
Copy Markdown
Author

I'm just going off of what the original intended behavior seemed to be

@AlexALX

AlexALX commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

nit of off topic - well just in real bluray discs, cd ray actually changes focus using lens for read proper stack, so never changes laser emitter position. however in wiremod we don't have such lens, but moving physically inside disk also wrong way. i'd say stacks probably should be based on distance to disk, or just set "stack" via Command, since this will be more like real ones.

as said earlier, this PR has nothing to do with original behavior what are wrong initially... So we can fix wrong behavior or completely redo how stacks actually works...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants