// ==UserScript==
// @name Hostile Volume Winner
// @match https://hostilevolume.com/
// ==/UserScript==
(function () {
const s = document.createElement('script')
s.textContent = `
(function () {
function visible (id) {
return !document.getElementById(id).classList.contains('hidden')
}
function win () {
if (visible('victory-screen')) return
if (visible('instructions-modal')) {
document.getElementById('start-btn').click()
setTimeout(win, 2000)
return
}
setTimeout(function () {
document.getElementById('l13-age-input').value = '01011970'
window.cancelAnimationFrame(levels[currentLevelIndex].frame)
}, 100)
window.setVolume(25)
setTimeout(win, 3500)
}
win()
})()
`
document.body.appendChild(s)
})()
If you don't have a userscript manager, you can just copy the script between the two backticks and paste it to the Developer Tools console.I imagine the existence of those means that CD drives had their own DAC and other logic. I guess there was an idea of wanting to play CD audio without it being a PC concern? Or on PCs without audio capability?
Unfortunately, a decent number of machines were not fitted with the relevant cable. Combined with the low-quality DACs that most drives used, the compatibility issues that plagued ATAPI implementations and the dramatic increase in CPU power and sound card quality throughout the mid-to-late 90s, this led media player software to quickly move on from drive based playback to so-called "digital audio extraction", where the CD is basically ripped in real time and streamed to your sound card's own DAC. Thus, unless you played older games that relied on hardware CD-DA playback [1], it's somewhat unlikely you ever experienced it under, say, Windows 98 or XP.
[1] As offloading playback to the drive had no CPU overhead, games often stored their music as additional tracks on the game disc and played it that way. Incidentally, basically all CD-ROM-based game consoles and arcade systems relied heavily on hardware accelerated playback as well, with some going even further and allowing for compressed (ADPCM) CD audio streaming with no CPU intervention.
And I’m not sure if that was still the case in 1997, but most likely changing the volume of digital sound meant the CPU having to process the samples in realtime. Now on one hand, that’s probably dwarfed by what the CPU had to do for decompressing the video. On the other hand, if you’re already starved for CPU time…
for (i = 0; i < 50; i++) { document.querySelector("#l3-down").click(); }But, if you put a resistor in parallel, you need to work out that:
R = 1 / ((1 / R1) + (1 / R2)) or Rbottom = 1 / ((1 / Rbottom) + (1 / Rfixed)) where Rfixed is the amount you're "bending" it by.
So you could make the amount of "logness" be adjustable by having another (linear) control to vary Rfixed.
You'd work out, for a pot rotation Vol from 0 to 1:
Rbottom = 1 / ((1 / Vol) + (1 / Rfixed)) Rtop = 1 - Vol Scale = Rbottom / (Rbottom + Rtop)
Now for those better at arithmetic than me, how can you reverse this? Imagine you've got a pot in a piece of equipment with a resistor between the wiper and ground giving a log curve, and you've got to read that with an ADC and turn it back into the linear position of the wiper.
It ought to be possible but I've always sucked at arithmetic.
Love the game, btw.
#3 are almost like Google Maps' zooming buttons. They jump around more, making you click on the map itself or swap in/out.
edit: ok... somehow my approach didn't work the first time, but got to 18!