andrewmjenner

andrewmjenner

VCR software decoding test

VCR software decoding test

Dírojed CGA

Dírojed CGA

dirojed CGA

dirojed CGA

Beats of two colour carriers

Beats of two colour carriers

Masking out the sync signals

Masking out the sync signals

Circuit without substrate

Circuit without substrate

Physical Tone Matrix overview

Physical Tone Matrix overview

Waller's torus in 4 dimensions

Waller's torus in 4 dimensions

Rotating fractal

Rotating fractal

A trip around the cardioid

A trip around the cardioid

Variable branch cut

Variable branch cut

Second reslicing

Second reslicing

Reslice of yesterday's movie

Reslice of yesterday's movie

Пікірлер

  • @moonowo
    @moonowoАй бұрын

    Nice demo!

  • @TheRealHarrypm
    @TheRealHarrypm2 ай бұрын

    VHS-Decode today makes FM RF archive decoding look like childs play, I guess this was a CX Card capture with CXADC ay? (be intresting to see it re-decoded today)

  • @timoloef
    @timoloef6 ай бұрын

    Once I realized this is on a 1981 machine, I was very very impressed

  • @user-sv9ek8if4x
    @user-sv9ek8if4x11 ай бұрын

    FISCHINGs !!!!!!!!!!!!

  • @tcspersonal7889
    @tcspersonal7889 Жыл бұрын

    Andrew, I don't understand what you've done. VCRs have composite, s-video or RGB video outputs only. What do you mean by "RF capture"? Are you tinkering with the hardware opening the cover and touching or tampering with any of the electronics inside the VCR???

  • @andrewmjenner
    @andrewmjenner Жыл бұрын

    Yes, that's exactly what I did. The encoding of the images on the tape is described as RF (presumably because the frequencies involved are high enough to be described as Radio Frequency). VCRs have test points that can be tapped to monitor this signal encoded for tape, and I tapped them.

  • @middle-agedclimber
    @middle-agedclimber Жыл бұрын

    I imagine myself seeing this in times of Alley Cat. You'd be seen as a traveller from different dimension.

  • @Ben-official-90
    @Ben-official-90 Жыл бұрын

    I love this video

  • @Ben-official-90
    @Ben-official-90 Жыл бұрын

    Is the best

  • @thanthanasiszamp4707
    @thanthanasiszamp4707 Жыл бұрын

    But can it play Duke Nukem 3D with such graphics, if the source code re rewritten?

  • @Channel7Tonight
    @Channel7Tonight Жыл бұрын

    THIS SHOULD BE ILLEGAL! >:O!!!!!!!!!

  • @totheknee
    @totheknee2 жыл бұрын

    If this could be done in 1981, imagine what we could do in 2020! Oh wait, just Doom 27.0 or Fortnite or whatever they call it these days... 😭

  • @antispin5
    @antispin52 жыл бұрын

    That was incredible. I can't imagine how much work was required to do this. As the former owner of an 8086/CGA as well, you've made my day.

  • @bensfractals43
    @bensfractals432 жыл бұрын

    what's your rotation formula?

  • @andrewmjenner
    @andrewmjenner2 жыл бұрын

    There are some technical details at www.reenigne.org/blog/rotating-fractals/ and www.reenigne.org/blog/rotating-fractal/

  • @bensfractals43
    @bensfractals432 жыл бұрын

    some of the frames remind me of the distorted minibrots near singularities

  • @MichaelAutism
    @MichaelAutism2 жыл бұрын

    some parts look like Quasi.

  • @Mikewee777
    @Mikewee7773 жыл бұрын

    Neat depth map.

  • @kms727300
    @kms7273003 жыл бұрын

    What is this? Classic Super Hexagon?

  • @deoz9741
    @deoz97413 жыл бұрын

    idk what im looking at but this looks and sounds awsome

  • @dest1x269
    @dest1x2693 жыл бұрын

    I feel stupid for not understanding anything what people in the comments is saying

  • @AndreaFistetto
    @AndreaFistetto3 жыл бұрын

    epilessia portami via!

  • @SilverSpoon_
    @SilverSpoon_4 жыл бұрын

    by Celestia! MY DRUGS!

  • @KirillTitov
    @KirillTitov4 жыл бұрын

    _This is illegal you know_

  • @andrewmjenner
    @andrewmjenner4 жыл бұрын

    😱

  • @MadameSomnambule
    @MadameSomnambule2 жыл бұрын

    MY CAKES WILL BURN!

  • @Semtex777
    @Semtex7774 жыл бұрын

    source code

  • @eddievhfan1984
    @eddievhfan19844 жыл бұрын

    Re: "racing the beam", is that whole sequence meant to imply the image was made through precise interrupts/transfers to the CGA's memory, simulating H-blank interrupt/DMA?

  • @andrewmjenner
    @andrewmjenner4 жыл бұрын

    The Kefrens bars sequence is made by a routine that is precisely timed to synchronise to the raster beam (by counting cycles - it takes exactly 304 CPU cycles for the beam to complete one raster line). The phrase "racing the beam" is also meant to put one in mind of Atari 2600 coding, where there is no frame buffer. There is no frame buffer as such in this effect either - just two scanlines worth of buffer which is repeated down the screen. Each scanline the contents of the line buffer is changed slightly so that the image varies vertically down the screen. DMA is not involved here (the PC/XT has a DMA chip but it's not useful for this purpose). An H-blank interrupt of sorts is possible by setting the timer period to the right length but the interrupt overhead would not leave sufficient time to do the VRAM updates so counting cycles is the only way. Hence this was the most difficult effect in the demo for emulators to get right.

  • @eddievhfan1984
    @eddievhfan19844 жыл бұрын

    @@andrewmjenner The slightest variation in timing an instruction in the emulator (or failing to enforce video/CPU timing synchronization), and you'd write to the "buffer" in the middle of rendering a scanline, hopelessly corrupting the output?

  • @andrewmjenner
    @andrewmjenner4 жыл бұрын

    @@eddievhfan1984 Pretty much, yes. If the per-scanline code doesn't take exactly 304 cycles then the points along the scanline where the buffer updates are done will drift to the left or right as the beam moves down the screen, leading to tearing. And then the routine might be desynchronised for the next frame as well.

  • @eddievhfan1984
    @eddievhfan19844 жыл бұрын

    @@andrewmjenner TBH, I thought if the writing routine interfered with transmitting the sync signals from the CRT controller, it would basically cause the monitor to go haywire. Either way, a true testament to optimization and riding the edge of the hardware. Good on ya.

  • @andrewmjenner
    @andrewmjenner4 жыл бұрын

    @@eddievhfan1984 The horizontal sync signals are still timed by the CRT controller and are not affected by the effect code. The effect code does takes over responsibility for the timing of the vertical sync signals, though, reprogramming the CRT controller at the top and bottom of the visible frame. So if the timing is wrong then the monitor might lose vertical synchronisation. We were concerned that this could damage monitors (hence the timing test at the beginning and warning if the hardware doesn't seem to be cycle identical with the original PC or XT). However, we have since learnt that this kind of monitor damage is not really possible in practice so the warning is probably redundant. Thanks!

  • @btizef2008
    @btizef20084 жыл бұрын

    Not gonna lie... this is amazing.

  • @levilevis9032
    @levilevis90324 жыл бұрын

    It would've taken 15 floppy discs to accomplish, but god can you imagine a 1981 game with THESE graphics as between-level cutscenes?

  • @matthewrease2376
    @matthewrease23764 жыл бұрын

    Wish I had some way to see the awesome color on my Tandy 1000 TL/2

  • @abhay8437
    @abhay84374 жыл бұрын

    Wut?

  • @madcat789
    @madcat7894 жыл бұрын

    That's some clever programming.

  • @Bishaco
    @Bishaco4 жыл бұрын

    Pushing the limits of..... oh wait!

  • @S13Reborn
    @S13Reborn4 жыл бұрын

    I bought back an old XT just to run this and see it running live, that’s how impressed I am.

  • @andrewmjenner
    @andrewmjenner4 жыл бұрын

    That is quite impressively dedicated - thank you! I hope you will find some other interesting things to do with it as well.

  • @S13Reborn
    @S13Reborn Жыл бұрын

    @@andrewmjenner Back here! forgot about my own comment, yes, I found other use cases and I got a healthy collection during these years. I even got a Sony PVM monitor in order to be able to see the demo at it's best (not only because of that, but was an important factor). Fantastic fantastic.

  • @andrewmjenner
    @andrewmjenner Жыл бұрын

    Hope you enjoy the latest offering too!

  • @S13Reborn
    @S13Reborn Жыл бұрын

    @@andrewmjenner As soon as I have time, I'll install it and enjoy it!!!!! Seen the live video, is awesome!

  • @Mrcake0103
    @Mrcake01035 жыл бұрын

    What?! _What the fuck?!_

  • @eribetra
    @eribetra5 жыл бұрын

    So this is basically an emulated VCR running on a computer, or is it something else? If it's the former, congratulations!

  • @andrewmjenner
    @andrewmjenner5 жыл бұрын

    Parts of the VCR are emulated, parts are real. The tape and heads are real, but the process for decoding the data coming from the heads and turning it into a visible image is done in software. It is not a huge step to go from there to a completely emulated VCR - I just haven't implemented it yet. It's something that I'd like to do at some point, though.

  • @eribetra
    @eribetra5 жыл бұрын

    @@andrewmjenner I bet you'd be able to digitize the magnetic signals from the tape and emulate the heads, and then try to run it through the decoder.

  • @andrewmjenner
    @andrewmjenner5 жыл бұрын

    @@eribetra Well, to digitize the magnetic signals from the tape you need some heads to get the signal off the tape and into an electrical signal that can be sampled. Which is what I am doing in this video - the source digitized signal is the one coming right off the tape heads (after they are combined into a single signal). It's possible to emulate the tape and heads as a system but not really just one or the other as emulated heads can't read physical tape and physical heads can't read emulated tape.

  • @eribetra
    @eribetra5 жыл бұрын

    @@andrewmjenner So then you emulate the tape & heads, alongside everything you've already done, and then it's basically a completely emulated VCR?

  • @andrewmjenner
    @andrewmjenner5 жыл бұрын

    Almost. The other part is that this is only a decoder so far - an encoder would be needed as well but that's just a matter of reversing the steps of the decoder. An interesting thing to do would be to add various real-world imperfections to the emulation, like dropouts, tape stretching, and the heads being misaligned with the data on the tape (and emulating the servo mechanism to get it back in synchronisation).

  • @a4e69636b
    @a4e69636b5 жыл бұрын

    Just tested it out on QEMU. It didn't work.

  • @andrewmjenner
    @andrewmjenner5 жыл бұрын

    Emulators don't tend to do a good job with this demo since it relies on exact cycle counting and other low-level trickery. There are certain builds of 86box which have been able to run it, though.

  • @a4e69636b
    @a4e69636b5 жыл бұрын

    Absolutely love the Back to the Future animation.

  • @ianedmonds9191
    @ianedmonds91915 жыл бұрын

    Huge props. That's a stunning demo and pushes the hardware to crazy undreamed of heights. Mind blowing stuff. Luv and Peace.

  • @SWRadioConcepts
    @SWRadioConcepts5 жыл бұрын

    IBM PC was designed for serious business and business graphics, not games. Also PC has a far more powerful processor than Commodore, and 16-bits! Not to mention far more RAM.

  • @andrewmjenner
    @andrewmjenner5 жыл бұрын

    The IBM PC was designed to compete with microcomputers like the Commodore PET, Atari 400/800, Apple II, Tandy TRS-80 and various CP/M machines. All of which were used in the home as well as the office. The fact that the PC (with CGA card) was designed from the beginning to be able to use an NTSC TV set as a monitor (hence the 4.77MHz CPU frequency) suggests that home use (i.e. games) was a market that IBM had in mind. In fact, one game (Microsoft Adventure) was a launch title for the PC. It's true that 8088 is a bit more powerful than the 6502 but not as much as you might suspect from the 8/16 bit difference - both machines had an 8 bit memory bus which was in practice usually the bottleneck (but the 8088 has a more space-efficient and powerful instruction encoding). As for more RAM: not really! The first PC's motherboard supported configurations of 16kB-64kB inclusive (it is a bit cheeky of 8088 MPH to use 640kB which would have been technically possible in 1981 but unusual and expensive).

  • @Scalibq
    @Scalibq5 жыл бұрын

    I'm not entirely sure about the size-efficiency of the instruction sets of 8088 vs 6502. I suppose it depends on what you want to do. 6502 has the zero-page, which allows for very compact instruction encoding. There are also more common instructions that fit into a single byte than on 8088. Sure, you will need more instructions for the same code in many case, but I'm not sure if that balances out in the 8088's advantage.

  • @andrewmjenner
    @andrewmjenner5 жыл бұрын

    @@Scalibq I had a recent example in mind: the fast Mandelbrot code I wrote over at vcfed in May. The inner loop was 23 bytes of 8088 code, and the corresponding 6502 code was 97 bytes. Granted that uses a lot of 16-bit arithmetic which the 8088 is particularly well-suited for (and the 6502 is particularly ill-suited for) but I think the 8088 has an advantage for 8-bit data types too (albeit a smaller one). In particular, a single 2-byte instruction can encode two 3-bit register numbers and a 3-bit ALU operation on 8088, whereas on 6502 you'd need two 2-byte instructions to address two zero page locations. But don't take my word for it - I encourage you to pick a little routine, optimise it for 8088 and 6502 and see which wins.

  • @geminielectro
    @geminielectro5 жыл бұрын

    Woah, it's amazing! I still love to watch tech demos. It's always surprising...

  • @Cyberdemon1542
    @Cyberdemon15425 жыл бұрын

    I would love to see Doom on this!

  • @andrewmjenner
    @andrewmjenner5 жыл бұрын

    Doom is tricky because of the floors and ceilings - they need quite a lot of divisions to calculate, which are really slow on 8088. I reckon a pretty decent Wolfenstein 3D could be done on this hardware though.

  • @Roxor128
    @Roxor1285 жыл бұрын

    @@andrewmjenner - What about a lookup table for translating coordinates? Or would that need to be prohibitively large?

  • @andrewmjenner
    @andrewmjenner5 жыл бұрын

    @@Roxor128 Yes, prohibitively large tables is the problem. Doing walls with lookup tables isn't too bad because you can consider each vertical slice separately, and essentially have a table in which you can lookup the texture Y coordinate by screen Y coordinate and distance (which is manageable). Because you can rotate in the plane parallel to the floor there is orientation to consider as well as position - the lookup table method would just have too many inputs.

  • @Roxor128
    @Roxor1285 жыл бұрын

    @@andrewmjenner - Ah, so you'd basically run into the fact that you'd need three or four dimensions of array data, which would easily eat up more memory than could be spared on a machine of the era.

  • @s3tTz
    @s3tTz5 жыл бұрын

    How has this only got 53K views??? Man, I wish I still had my old XT. Great memories.

  • @andrewmjenner
    @andrewmjenner5 жыл бұрын

    The party version at kzread.info/dash/bejne/q3yM2pWoorGZZbw.html has 213K views at the time of writing...

  • @fieldofdre4ms
    @fieldofdre4ms5 жыл бұрын

    4:26

  • @crystalgames
    @crystalgames6 жыл бұрын

    This is FUC**ING FREAKY AMAZING! Hardware pushed to the limits! Genius coders, with tight CPU to CGA peripherials control! WOW WOW I shit bricks!!!) You're genius coders who can do magic. And PC Speaker with AMPLITUDE control, how did you ever do it? its 1 bit buzzer!! I know that its possible to break the diaphragm cycle with high frequency base wave but its insane coding skills! you're created something really amazing!! so many colors, full vsync control, super fast asm code... WOW WOW

  • @andrewmjenner
    @andrewmjenner6 жыл бұрын

    Thank you for the kind words! If you're interested in how the multi-channel PC speaker music was done, I did a detailed write-up at www.reenigne.org/blog/8088-pc-speaker-mod-player-how-its-done/ .

  • @crystalgames
    @crystalgames6 жыл бұрын

    Thanks, its a fun reading, you're amazing) Once I was shocked when heard cubic player playing the MOD with the volume modulation on pc speaker's but it was on 386... not sure I understood the physical process behind it, but I could guess that a diaphragm has its inertion so if we set bit to 1 it goes -1 and bit 0 it goes +1 if we do it really fast the diaphragm will stop somewhere between 0.3 and starts to head to -0.3 . Looks like PWM is another way to solve it - by thinking in time domain rather than amplitude domain. I.e. we assume that diaphragm moves fast enough but allow it to oscilate in small time slot ____||___

  • @andrewmjenner
    @andrewmjenner6 жыл бұрын

    The PWM output is actually the easy bit (lots of other programs have done PWM playback on this hardware in the past). Yes, if you want the speaker at position x% of its range then you program the timer to output "high" for x% of the time and "low" for (100-x)% of the time. If the pattern of highs and lows repeats quickly enough then all the frequencies other than the desired ones will be out of the range of human hearing (or the ability of the speaker to reproduce) and you'll hear the desired sound. PWM just means that for any given cycle we put all the high bits together and all the low bits together in a single pulse of variable (modulated) width, which is easy for the timer chip to do and the carrier isn't too audible if the cycle length is short enough.

  • @crystalgames
    @crystalgames6 жыл бұрын

    I see so PWM is just like a regrouping of pulses within the cycle. And indeed its not the most exciting stuff in the demo )) I like so many things in it amazing precise CRT ray timing control and many other neat tricks like raster font generator control etc. I used to write 386 asm and did some neat tricks with vga memory. For me it started from the Commander Keen and its smooth background scrolling on EGA. Sadly those days are gone and there's no practical use to these skills. I could imagine how many amazing games and demo experiences could be written if moore's law was frozen... What felt magic in 1990x now is just a niche wizardry for geeks.... And the modern hardware is too powerful and too abstracted out of the direct programmer's control...

  • @jairusgd8000
    @jairusgd80006 жыл бұрын

    Extend it so I dont have to press replay every 8 mins

  • @dustnoiseplays
    @dustnoiseplays6 жыл бұрын

    Love it

  • @SamBlye
    @SamBlye6 жыл бұрын

    holy damn this is so rad

  • @Paultimate7
    @Paultimate76 жыл бұрын

    Much better.

  • @Paultimate7
    @Paultimate76 жыл бұрын

    240 p in 2014 ya bitch?

  • @andrewmjenner
    @andrewmjenner6 жыл бұрын

    Standard CGA is 240p no matter what year it is...

  • @joe2501echo
    @joe2501echo6 жыл бұрын

    should probably clip off that high pitched buzz on the end credits. my ears...

  • @andrewmjenner
    @andrewmjenner6 жыл бұрын

    Perhaps... though I did want the capture to accurately portray how the demo runs on real hardware, and that PWM carrier whine is an unavoidable part of this music playback routine when run on real hardware. I'll just have to come up with a new way to play multi-channel music on PC speaker which doesn't have that problem, for a future demo. I do have some ideas about that...

  • @joe2501echo
    @joe2501echo6 жыл бұрын

    I'm no programmer, so a lot of this is a mystery to me, but maybe next time you could try hiding it behind some of the other noises the hardware makes. The high pitched whine could be easily hidden by a CRT monitor whine, and a low 60Hz hum can be pretty easy to hide, especially if you have some way to detect and the hum already coming from the power supply with enough accuracy to have the two sounds cancel out to some degree. Love the demo, by the way. It's always cool to see hardware being used to do things that not even the original designers thought would be possible.

  • @andrewmjenner
    @andrewmjenner6 жыл бұрын

    I've definitely thought about using a 15.7kHz PWM carrier to disguise it as the monitor's flyback whine. On a youtube capture like this, that would actually make it more noticeable rather than less (since the frequency would be lower than the 16.6kHz PWM here). On real hardware there's no reliable way to make the flyback and the PWM *cancel* since it would depend on the relative positions and orientations of the listener, the speaker and the monitor's flyback transformer. But it would at least be less noticeable because the machine is making a noise at the same frequency and with a constant relative phase. As for a 60Hz hum, this routine doesn't have that particular problem (and my 5160's PSU doesn't make a mains-frequency hum anyway).

  • @joe2501echo
    @joe2501echo6 жыл бұрын

    It's an interesting problem. I can only think of two solutions which are, making the carrier wave some ridiculous value out of the range of human hearing, or modifying the hardware so that the speaker is physically unable to push that specific frequency. Though I'm sure you would've used the former method if the hardware was capable of it.

  • @andrewmjenner
    @andrewmjenner6 жыл бұрын

    Demogroups usually avoid modifying the hardware to make demos run better, so that anyone with the same hardware can run the demo the same way. So yes, it's really a matter of increasing the sample rate to push the carrier frequency as high as possible. The routine is so optimized that I'm sure it's not possible to increase the rate any higher without sacrificing audio quality in other ways (e.g. reducing the number of channels), so it's a trade-off. Since most people who used IBM PCs when they were new are now too old to hear 16.6kHz very well, we felt that it was a good trade-off.

  • @krapslip
    @krapslip6 жыл бұрын

    This needs support for the covox speech thing.

  • @andrewmjenner
    @andrewmjenner6 жыл бұрын

    We've thought about it, but it turns out that it would actually be really difficult. For the credits part, we'd have to output to a port number higher than 255, which means we need to have the port number in the DX register. That means that we'd either have to save and restore DX to RAM or we wouldn't have the register available for a phase. So we'd have to reduce the sample rate or the number of channels or both. For the other parts it's even more difficult since we'd need to do audio updates at the sample rate rather than once per frame, which means interrupting the effects much more often and slowing them down.

  • @Scalibq
    @Scalibq6 жыл бұрын

    Also, the Covox would not have been available in 1981, unlike all other hardware the demo requires.

  • @Beansman-gp3ws
    @Beansman-gp3ws6 жыл бұрын

    Not even Traveller's Tales could do this and they did all sorts of cool stuff with the Genesis.

  • @andrewmjenner
    @andrewmjenner6 жыл бұрын

    The Genesis is amenable to different techniques than the PC/CGA, but I've been enjoying those GameHut videos too and it's interesting to see the parallels between their tricks and ours.