100th Coin

100th Coin

On this channel I'm going to be breaking video games. Probably Mario 3. Mostly Mario 3. I'm breaking Mario 3.

Пікірлер

  • @mm3shadowman982
    @mm3shadowman982Күн бұрын

    A TAS within a TAS, brilliant

  • @ItsSudonim
    @ItsSudonimКүн бұрын

    I wonder how it would affect the video and audio quality to disallow the usage of U+D and L+R. You could probably get away with lowering the sample rate of the audio a touch and reading controller inputs twice if required, if I understand how this all works correctly.

  • @100thCoin
    @100thCoinКүн бұрын

    It would probably affect the audio quality a bit, since my next best audio loop would be reading the controller's upper nybble (A+B+Select+Start) then strobing the controller again for the next 4 bits. Disallowing D-Pad conflicts would make writing code a nightmare, as the simple task setting a target address to $300, or storing a byte ending in a 3, 7, B, C, D, E or F would be impossible. I would most likely just write a slightly different input reading loop that just grabs A+B+Select+Start, strobes, and grabs A+B+Select+Start again. This mostly just makes certain things run slower, such as storing packet info, which means there's less time in a frame to play the audio at the highest quality, making the audio quality dip. Though actually, the *real* strategy here would be set the controller latch, and never clear it. Then I could just stream 1 bit at a time through the A button, never needing to strobe the controller. I don't know if Bizhawk supports that, but it would genuinely save cycles while not using the DPad at all! Oh- and there would be minor changes to the SMB1 gameplay, as that uses left+right to accelerate faster.

  • @JaysYoshiYT
    @JaysYoshiYTКүн бұрын

    That level would of been evil

  • @Wrulfy
    @WrulfyКүн бұрын

    Okay so, during the ACE, the NES ends up reading the inputs from the controller, multiple times in a single frame, and use that to write the graphics and sound data, but how do you synch the inputs so the emulator gives the correct values during ACE?

  • @Wrulfy
    @WrulfyКүн бұрын

    Or it is all read one frame at a time then the footage is highly speed up? How would that work with the audio not messing up?

  • @100thCoin
    @100thCoinКүн бұрын

    @@Wrulfy The emulator (Bizhawk) has a built-in AVI recorder. This is using the SubNesHawk core of bizhawk, which allows for subframe inputs. Watching the TAS in the emulator will be tragically slow, since every frame is split into "subframes" for every instance of the controller being read, (which makes this TAS about 500 times slower to watch in the emulator) but the exported AVI file from the emulator can be watched at normal speed.

  • @renakunisaki
    @renakunisaki2 күн бұрын

    Two possible improvements: 1. Can you flip tiles? That gives 1024 possible matches instead of 256. 2. Can you use a multitap or Famicom to read four controllers at once? I think with Famicom you have two wired in and can plug two more into the back, and all four can be strobed at once?

  • @100thCoin
    @100thCoin2 күн бұрын

    "Can you flip tiles?" Nope. I think you can do that on the Super Nintendo, but that's not a feature of the NES. "Can you use a multitap or Famicom to read four controllers at once?" Yes, I could! They would all be strobed at once too! I haven't tested this, but I think I could I probably could get a faster audio loop with just controller 1 and controller 3, since reading $4016 would grab a bit from both of those controllers. Instead of "EOR $4016, ASL A" repeated 8 times, I could do "EOR $4016, ALS A, ASL A" repeated 4 times, bringing the total down to 51 cycles per loop. Definitely a good idea if I make something like this in the future!

  • @zigludo
    @zigludo3 күн бұрын

    when is the optimal route speedrun for nerds :((

  • 3 күн бұрын

    29:20 how will AVGN says: Now you really pull my leg, DOOM on NES?

  • @cleeaf
    @cleeaf3 күн бұрын

    Now we gotta play this video inside of Super Mario Bros and then create an infinite loop

  • @Alphie_
    @Alphie_4 күн бұрын

    You wrote an emulator for the sake of Bad Apple. You are my idol.

  • @DerCooleJustin
    @DerCooleJustin11 күн бұрын

    Can i download that emulator somewhere? Or do i also have to mod it?

  • @100thCoin
    @100thCoin10 күн бұрын

    The emulator is called Bizhawk, and it's open source on Github. Here's my fork with the cart swapping: github.com/100thCoin/BizHawk

  • @Snooty4835
    @Snooty483512 күн бұрын

    Bro why are people so hung up on 4:54 being the limit? Haven’t they seen this! /j

  • @fabicore100
    @fabicore10016 күн бұрын

    I learned more in this video than 5 years of uni

  • @LuwiigiMaster
    @LuwiigiMaster18 күн бұрын

    Imagine going back in time with a tasbot and plugging it into Nintendo's own famicom and showing them this - back in 1985.

  • @fehzorz
    @fehzorz18 күн бұрын

    Didn't seem like there was any length limit. So you could play a feature length movie. Something like Renaissance (2006) would look pretty good

  • @sixkayjay
    @sixkayjay19 күн бұрын

    while i get why most youtubers dont do it, i really appreciated this video assuming the viewer knows the basics of the background knowledge, which saves so much time and in general allows for more specific explanations.

  • @LavaCreeperPeople
    @LavaCreeperPeople19 күн бұрын

    Overrated Touhou 4 remix

  • @user-ui9qy6cw5y
    @user-ui9qy6cw5y20 күн бұрын

    me not understanding anything but still watching because bad apple in mario bros

  • @jrl924dds
    @jrl924dds21 күн бұрын

    14:25 my man just reinvented the Pokemon 1st Gen sprite compression scheme

  • @fernandossmm
    @fernandossmm21 күн бұрын

    I can't believe you didn't use Never gonna give you up

  • @ghb323
    @ghb32321 күн бұрын

    Not even SMB is safe from bad apple.

  • @ashleycampbell8380
    @ashleycampbell838022 күн бұрын

    I'm sure you edited it in.

  • @blocks4857
    @blocks485721 күн бұрын

    Did you even read the write up?

  • @ravensquote7206
    @ravensquote720622 күн бұрын

    r/ItPlaysBadApple

  • @honor_gamer
    @honor_gamer22 күн бұрын

    Why @username is blured? By the wy, PixelCraftian is a bot.

  • @coinyyt
    @coinyyt23 күн бұрын

    u should try this with steamboat willie

  • @B3Band
    @B3Band24 күн бұрын

    I like how you show maybe 10 seconds of Bad Apple, 3 seconds of your own game, but for some reason showed almost a full minute of a DOOM speedrun.

  • @100thCoin
    @100thCoin24 күн бұрын

    I figured showing more Bad Apple would be unnecessary since I already have the full video in a separate video. Since I don't have DOOM in a separate video, I might as well show it off.

  • @bitten2up
    @bitten2up24 күн бұрын

    i like how you blured out pixelcraftian even though alot of people can still tell who it is

  • @HedgehogGolf
    @HedgehogGolf24 күн бұрын

    13:30 lmao that brief moment of Chill Programming was way funnier to me than it has any right to be

  • @kalandillon8320
    @kalandillon832025 күн бұрын

    I love how when random people on the internet do some crazy tech stuff, it’s either, doom (1993) or bad apple.

  • @ethervagabond
    @ethervagabond25 күн бұрын

    ...I have a little trouble believing that music is coming out of a standard NES.

  • @casultaser
    @casultaser25 күн бұрын

    And how could you use ACE in SMB3 before evwn starting the game? Normally in SMB3 ACE you would clear 1-1 and 1-2 normally, grab the 2 warp whistles in 1-3 and 1-Fortress, warp to world 7, enter 7-1, place some Koopa shells in very specific spots, and clip into one of the pipes, entering it from the wrong direction, leading to you going Out of Bounds and with a few more inputs warp to the credits,

  • @100thCoin
    @100thCoin25 күн бұрын

    At SGDQ 2016, there was a TAS showcased that completes Mario 3 in 2 seconds. In 2018, Masterjun made improvements (so the credits don't softlock) and submitted a TAS beats the game in 0.78 seconds. I optimized that further down to 0.22 seconds. It's a lot to explain (and I plan to explain how those work in a future video) but to summarize: A hardware issue can lead to DPCM audio samples corrupting the data read from the controller. SMB3 uses DPCM audio for drums in the music, so the developers needed a way to prevent the samples from corruptign the controller. Their solution is to read the controller in a loop until two consecutive reads match. If any of them don't match, it's assumed to be because the DPCM audio bug occurred, but in the world of TASing, I could maliciously mas hthe A button so fast that it never matches for two consecutive reads. Due to the order of events in the NMI of SMB3, an IRQ is scheduled for 193 scanlines, ROM banks are swapped out for updating graphics, the controllers are read, then the banks are swapped back. If the IRQ occurs before the banks are swapped back, a jump to address $A826, expecting bank 24, but bank 26 is loaded instead. An RTS instruction pulls unrelated data off the stack and we begin executing RAM from address $0001. The game stored the buttons held + newly pressed buttons in address $17 and $18, and addresses $F5 through $F8. Using those bytes that I can control, I can create instructions for the CPU to process. In my 13 frame TAS, these instructions are TAX (X now equals $F4), TSX (I need the stack pointer to be greater than $30), JSR $0000, JSR $9000. In my TAS that sets things up for ACE in SMB1, I use the btyes I can manipulate to write a function that gives me more control, then I use that to write everything I need before swapping carts. This function is mostly written by loading X with whatever byte I need, then storing it somewhere. I can't use the A or Y registers, since lots of other bytes on the zero page will change the values, but the X register can remain unchanged between frames, allowing me to swiftly LDX and STX to write code.

  • @JMFSpike
    @JMFSpike25 күн бұрын

    Glitch levels in SMB1 are sooooooooooo much more interesting due to the way that game works.

  • @pugchamp419
    @pugchamp41926 күн бұрын

    now do it with handcam

  • @qoombert
    @qoombert26 күн бұрын

    doom tas video inside mario tas tasception

  • @BloodisFuel7
    @BloodisFuel726 күн бұрын

    if it exists, it (for whatever reason) will have bad apple on it

  • @seanbrownlee9474
    @seanbrownlee947426 күн бұрын

    This is so cool

  • @Einhamer
    @Einhamer26 күн бұрын

    This dude will play a full-quality audio just by the PCM channel of the NES, entirely written by controller inputs after writing an entire NES emulator inside an NES emulator AND STILL complain "it sounds bad"

  • @ScrombIo
    @ScrombIo26 күн бұрын

    imma be real, i hate the word superplay. is there any better fit-in word for tases like this?

  • @Firewall422
    @Firewall42226 күн бұрын

    With the way graphics are drawn on the screen, wouldn’t it be more efficient to only update the “pixels” that changed rather than the whole row? Was wondering if you investigated that type of compression.

  • @TheWanderingNeko
    @TheWanderingNeko26 күн бұрын

    15:53 i would've loved to hear the math though :( can you upload a video with all the "boring" stuff included? i love stuff like this

  • @100thCoin
    @100thCoin25 күн бұрын

    It's not in video form, but here's an incredibly detailed comment, which is the next best thing. The only time graphics can be updated is during a blanking period. The Vertical blanking interval (when the scanning beam of a CRT television is going from the bottom back to the top) lasts 2,387 CPU cycles. Of course, without the context of how many cycles it takes to update a tile, the numbers are meaningless. The process of moving the PPU's Read/Write address is "LDA #ZZ, STA $2006, LDA #ZZ, STA $2006". An LDA Immediate instruction take 2 cycles, and an STA Absolute instruction takes 4 cycles, so in total just updating the PPU Read/Write address takes 12 cycles. Ideally, I could have code that is simply "LDA #ZZ, STA $2007" over and over and over, for every tile of the screen. Unfortunately, updating the operands for those LDA #ZZ instructions would be difficult. (time consuming in cycles, making it inconvenient) Hence the system of packets. All the data is stored on the zero page, and the X register will be used to grab the next byte of data. Here's where the math gets tricky. If I walk you through my ASM code, we can count cycles and see how long it would take to update a row in the worst case scenario. My method of waiting for vblank is in a 5 cycle loop. worst case, this takes 5 cycles at the beginning of vblank. I disable rendering. "LDA #00, STA $2001" takes 6 cycles, bringing the total to 11. Now we run the loop for each row to be drawn. Here's how it goes: "LDA <$00, X" reads the first byte of the packet. The loop takes +4 cycles. (a total of 4 so far this loop) "BMI Terminator" branches to the post-loop code if the byte read is the terminator. +2 cycles. (6) "BEQ NoPPU" skips the code that updates the PPU Read/write address. This is the worst-case scenario, so we need to update that. +2 cycles. (8) My code to update the read/write address is as follows: "STA $2006" Store the first byte read in the high byte of the read/write address. +4 cycles (12) "INX" Increment X for the next byte. +2 cycles. (14) "LDA <$00, X" Load the next byte. +4 cycles. (16) "STA $2006" store the low byte of PPU read/write address. +4 cycles. (20) Now that the read/write address is updated, let's write the PCM data to the APU. "INX" +2 cycles. (22) "LDA <$00, X" Load the next byte. +4 cycles. (26) "STA $4011" Writes PCM data to the APU. +4 cycles. (30) "INX" +2 cycles (32) "LDY <$00, X" This is the length of the packet. How many tiles to draw? +4 cycles (36) "BMI Individuals" If the length is greater than hex 80, draw a series of unique tiles. In this case, the branch is taken. +3 cycles (39) "INX" +2 cycles (41) "LDA $074F, Y" This is grabbing data from a jump table. +5 cycles (46) "STA $0101" Store for the jump. +4 cycles (50) "JMP ($0101)" +5 Cycles (55) And now since the length will be 20 in the worst case scenario, it's 20 copies of: "LDA <$00, X" "INX" "STA $2007" * 20 is 200 cycles. (255) and a 3 cycles JMP back to the start of the loop makes it a total of 258 cycles each loop if they are all the worst case scenario. Each frame will draw either 7 rows, or 8 rows before reaching the terminator, so we need to make sure that this code running up to 8 times in a frame is less than the 2,387 cycles of VBlank. 11 + 258 * 8 = 2075 cycles. We're not out of the weeds just yet, as we still need to update the PPU Read/Write address for the purposes of the screen rendering. This also alternates every 2 frames from $2000 to address $2400 (which is how I swap which nametable is being rendered every 2 frames) Let's see what happens now: "LDA <$00, X" +4 cycles. "BMI Terminator" In this case, the branch is taken. +3 cycles. "INC $103" I use address 103 to count frames. +6 "LDA $103" Load $103 into A +4 "AND #$03" Truncate it to just 0 to 3. +2 "TAX" X = A. + 2 "LDA #20" A = 20. +2 "CPX #$02" Compare X with the number 2. +2 "BMI Use20" If X is less than 2, we change this 20 to a 24. +2 "ORA #$04" A = 24. +2 "STA $2006" Store in PPU Read/Write high byte. +4 "LDA #00" A =0. +2 "STA $2006" Store at PPU Read/Write low byte. +4 Then I finally enable rendering "LDA #0E" +2 "STA $2001" +4. bringing the total number of cycles in the worst case scenario frame up to 2120, which is indeed less than 2387.

  • @TheWanderingNeko
    @TheWanderingNeko25 күн бұрын

    @@100thCoin 🙏

  • @KateWilliams-xl2xw
    @KateWilliams-xl2xw27 күн бұрын

    LMMS users rise up!

  • @RichConnerGMN
    @RichConnerGMN27 күн бұрын

    is the 5μs thing a joke

  • @100thCoin
    @100thCoin25 күн бұрын

    Nope! I did a ton of research on this one, asked around the NESDev discord and the TASbot discord and as far as we can tell this would actually work. Emulating it was easy (with my custom emulator), though actually testing in on hardware will be a bit challenging. I just finished writing the script for that video, and I imagine it will be a few months before I actually get it out. I might also try making the 5μs run happen on console as a way to end the video, which would probably take a lot of time to get working.

  • @Creative_YT
    @Creative_YT27 күн бұрын

    I’m going to make an fnf chart of those controller inputs

  • @feelincrispy7053
    @feelincrispy705328 күн бұрын

    This is stupid. Why did I watch every second of this video

  • @longschlongsilver7628
    @longschlongsilver762828 күн бұрын

    Hm. Personally, I would've just rewritten the whole song using the 5 channels the NES sound chip provides

  • @100thCoin
    @100thCoin28 күн бұрын

    I think using the sample channel to play 25Khz audio is much more impressive. There's not much audio quality to be gained by adding the other 4 channels. In addition to my experience with recreating music in famitracker being minimal, the main idea with this project was to play the music video as accurately as possible, audio included. Using the sample channel felt like the obvious choice.

  • @longschlongsilver7628
    @longschlongsilver762828 күн бұрын

    Ì wonder how it would look on a crt screen

  • @78wurrtrat
    @78wurrtrat28 күн бұрын

    3:50 1: Kill bowser 2: He turns into object 3: Jump to open bus 4: ?????????? 5: Profit

  • @WOKEchair
    @WOKEchair28 күн бұрын

    someone should play that one baldi's basics song (You're Mine) with this

  • @Crafty_Jumper
    @Crafty_Jumper28 күн бұрын

    What 100th coin sees: Performing ACE What I see: B U T T O N M A S H

  • @gustavgnoettgen
    @gustavgnoettgen28 күн бұрын

    Where did you play Bad Apple in Super Mario? When? Just wanted to cover all questions.

  • @100thCoin
    @100thCoin28 күн бұрын

    It was in world 'N' about a minute after the console was turned on. As for "Who?" and "Which?", we may never know.