How Bad Apple was played inside Super Mario Bros.

Поделиться
HTML-код
  • Опубликовано: 23 ноя 2024

Комментарии • 669

  • @HBMmaster
    @HBMmaster 6 месяцев назад +2325

    using this method it might one day be possible to play super mario bros (1993) inside of super mario bros

    • @buivars
      @buivars 6 месяцев назад +206

      Finally making Super Mario Bros. (1993) A mainline game.

    • @AzamMujahidProductions
      @AzamMujahidProductions 6 месяцев назад +35

      toki, nasin seme li suno sina?

    • @kaogaroo
      @kaogaroo 6 месяцев назад +33

      @@AzamMujahidProductions TOKI PONA LESGO

    • @morphious86.
      @morphious86. 6 месяцев назад +60

      Im genuinely curious how it would look if you were to pass a video of smb through it

    • @ImusingX
      @ImusingX 6 месяцев назад +28

      @@AzamMujahidProductions most random toki pona encounter

  • @Alberos
    @Alberos 6 месяцев назад +650

    Step 0: Get a Bad Apple video
    Step 1: Write a NES emulator in C#
    Step 2: ??? (Hand waving intensely)
    Step N-2: Profit

    • @tjthr
      @tjthr 3 месяца назад +1

      Just tae my god damn like

    • @cxpKSip
      @cxpKSip Месяц назад +3

      What are steps N-1 and N?

    • @JensGulin
      @JensGulin 29 дней назад +1

      ​@@cxpKSipnot an answer to your question, but 3:41 shows the reason for the N-2 pun.

  • @Altilt
    @Altilt 6 месяцев назад +969

    Oh so we're just casually skimming over coding an emulator?

    • @kellymountain
      @kellymountain 6 месяцев назад +16

      nesalizer:

    • @hedwig7s
      @hedwig7s 6 месяцев назад +13

      Probably a fork tbf but

    • @evangaming7447
      @evangaming7447 6 месяцев назад +30

      if the emulator dosnt need to be visualy and real time accurate and just needs to count cycles it is a good bit easier than a normal emulator that needs to display grqaphics and audio and be properly paced
      source: ive wrote a super basic emulator for the 6502 that has a subset of insturctions to be turring complete

    • @100thCoin
      @100thCoin  6 месяцев назад +246

      @@hedwig7s Nah, it's an original emulator. I've made a handful of NES emulators before (A lot of the visuals in my video about how Mario 3 loads levels were generated through emulating), though this one was from the ground up so it could have open bus support. Not that it needed open bus support to count cycles, but it was nice to learn more about open bus.

    • @evangaming7447
      @evangaming7447 6 месяцев назад +16

      to clarify its still takes a good bit of time and requires you to be a good programmer

  • @MnMGaming69
    @MnMGaming69 6 месяцев назад +89

    Imagine you're watching someone play super mario bros when suddenly they kill bowser, start mashing 5000 buttons, and bad apple starts playing

    • @JackieBright
      @JackieBright 19 дней назад +6

      You're watching someone play tennis, [insert however that ACE is done], switch cartridges without turning the console off, kill Bowser, and then mash buttons fast enough to melt the controller and never gonna give you up starts playet

  • @NewSchattenRayquaza
    @NewSchattenRayquaza 6 месяцев назад +655

    Super Mario is a gateway drug to comuter science

    • @Sparlock42
      @Sparlock42 6 месяцев назад +55

      How so? Mario travels everywhere by pipe :3

    • @hw8910
      @hw8910 6 месяцев назад +7

      you enter the compsci pipeline

    • @Tuntor689
      @Tuntor689 6 месяцев назад +24

      @@Sparlock42i don’t want any child of mine commuting by pipe system

    • @MintTheProtogen
      @MintTheProtogen 6 месяцев назад +10

      Be careful of the Mario pipeline.

    • @B3Band
      @B3Band 5 месяцев назад +5

      I like how he shows 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.

  • @Keatosis_Quohotos
    @Keatosis_Quohotos 6 месяцев назад +503

    This was the smartest way to advertise an indie game

    • @100thCoin
      @100thCoin  6 месяцев назад +125

      I gotta learn how to market my game somehow!

    • @CovenantAgentLazarus
      @CovenantAgentLazarus 6 месяцев назад

      ​@@HyperVanilostfu about Touhou nobody cares

    • @B3Band
      @B3Band 5 месяцев назад +47

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

  • @appleando752
    @appleando752 6 месяцев назад +251

    Any and all video players will play Bad Apple, and anything that isn't a video player will be forced into one so it can play Bad Apple.
    For being the video equivalent of "Can it run Doom" It is criminal that almost none of these Bad Apple videos and barely any of the comments mention Touhou.

    • @MintTheProtogen
      @MintTheProtogen 6 месяцев назад +1

      I wonder if there will ever be something new, but similar in the future.

    • @LennyQUMFIF
      @LennyQUMFIF 6 месяцев назад +14

      @@MintTheProtogenThere’s some guy on YT Shorts that requested for People to play his Video on the weirdest Devices.
      Sadly it actually got more popular than Bad Apple, since his Video played on a Times Square billboard… which Bad Apple hasn’t done yet.

    • @LennyQUMFIF
      @LennyQUMFIF 6 месяцев назад +6

      There sadly still isn’t a Video of Bad Apple on a Times Square Billboard…
      But that gives me an Idea… Bad Apple, on Super Mario Bros, on a hacked NES Mini??

    • @CovenantAgentLazarus
      @CovenantAgentLazarus 6 месяцев назад +2

      Nobody cares about Touhou

    • @appleando752
      @appleando752 6 месяцев назад +26

      @@CovenantAgentLazarus Ah yes. An indie multimedia series with 19 games (31 including spin-offs) that has been going on since 1997, and whose fan game catalog probably surpasses Sonic's. Nobody cares about.

  • @ct3000
    @ct3000 6 месяцев назад +227

    "Nes ROMs don't have enough storage for full length PCM music" Should've just made the player spam buttons for the music to play

  • @guzik1252
    @guzik1252 6 месяцев назад +89

    16:00 well guess what? I want math. I want to see dirty and naughty math and nasty assembly code, that's my entertainment

  • @OhhCrapGuy
    @OhhCrapGuy 6 месяцев назад +274

    Honestly, asking "why" of any arbitrary code execution attack is probably another way of saying "this video wasn't made for me"

    • @FirstnameLastname-sb3hj
      @FirstnameLastname-sb3hj 6 месяцев назад +6

      why is it possible? bugs and oversights!

    • @renakunisaki
      @renakunisaki 5 месяцев назад +7

      There's only one response: why not?

    • @Discoh
      @Discoh 5 месяцев назад +14

      ⁠@@renakunisakiIn the words of the great Cave Johnson: "Science isn't about why, it's about why not!"

    • @MINIMAN10000
      @MINIMAN10000 3 месяца назад +3

      Ultimately it comes down to I wonder if I could do something interesting using X, in this case super mario brothers as the baseline what is a good project so I can learn, very commonly the answer is bad apple due to being a black and white video it lends itself well to being a relatively easy project which is recognizable.

    • @blaz2892
      @blaz2892 Месяц назад

      They are possible cuz assembly and computer engineering are really hard, even now with decades of collective experience and basically infinite RAM and CPU cycles in comparison to a NES. The people who made the NES and developers who made the original NES games made a lot of novice mistakes because the entire field was too new for anyone to get the experience to be much more than a novice.

  • @Snidbert
    @Snidbert 6 месяцев назад +105

    guys will watch this and think "hell yeah"

    • @AlbySilly
      @AlbySilly 6 месяцев назад +16

      Hell yeah

    • @fco64
      @fco64 6 месяцев назад +8

      Yeah Hell

    • @radiotomatosauce99
      @radiotomatosauce99 6 месяцев назад +21

      I'm girls and I think "hell yeah"

    • @TheGameBoyss
      @TheGameBoyss 6 месяцев назад +6

      Hell yeah

    • @SireBab
      @SireBab 6 месяцев назад +3

      Hell yeah

  • @smob0
    @smob0 6 месяцев назад +58

    Instead of using a 1x1 kernel when searching for mario tiles, I wonder if a different shape could be better. Maybe a 3x3 gausian spread could help make some of the edges less jagged.
    I also like how the piano roll analogy became a reality. Its a sequence of button presses to make music. It's just the the first part of the piano roll builds the piano itself.

  • @IrisGalaxis
    @IrisGalaxis 6 месяцев назад +236

    I watched until you casually said "so I'll just write a nes emulator". I had to pause there. I just had to. Lmao! So awesome.

    • @M4XD4B0ZZ
      @M4XD4B0ZZ 6 месяцев назад +7

      Just wow

    • @QuintarFarenor
      @QuintarFarenor 6 месяцев назад +3

      especially considering he is already in an emulator to even have that kinda possibility (or a hardware modded nes to make cardrige swapping possible)

    • @flameofthephoenix8395
      @flameofthephoenix8395 6 месяцев назад

      @@QuintarFarenor Hm, pretty sure you can swap cartridges on an NES.

    • @jokerofspades-xt3bs
      @jokerofspades-xt3bs 6 месяцев назад

      @@flameofthephoenix8395 You don't understand what kind of swapping they are talking about

    • @flameofthephoenix8395
      @flameofthephoenix8395 5 месяцев назад

      @@jokerofspades-xt3bs Interesting, I don't know much terminology.

  • @xXBlueSheepXx
    @xXBlueSheepXx 6 месяцев назад +34

    The audio playing the NES part is what amazed me the most. Honestly, I was expecting Bad Apple added as SMB custom music

  • @emilycurtis766
    @emilycurtis766 6 месяцев назад +24

    I had a ton of fun watching this. Incredibly impressed you pulled this off, and even more that you explained it in a way that made sense to me. Normally technical glitch explanation videos fly a bit over my head but I was able to get this one with a minimum of pausing and rewinding.

  • @alephnull127
    @alephnull127 6 месяцев назад +136

    no way, 100th coin voice reveal? hell yeah.

  • @almostmatt1tas
    @almostmatt1tas 3 месяца назад +8

    Woah, didn't expect to see my Doom TAS at the end there :D Incredibly impressive video, makes me want to go learn some assembly!

  • @Pixelcraftian
    @Pixelcraftian 6 месяцев назад +137

    2:11 Hey, look, there I am! :D
    Incredible stuff!! Can't wait to see what you get up to next :]

    • @amogaamogus
      @amogaamogus 6 месяцев назад +1

      WOW! ITS PIXELCRAFTIAN NO WAYKGJDFGIUIOSUHGSGREGG

    • @funnerdave
      @funnerdave 6 месяцев назад +1

      hey look! there you are!!!!!!

    • @saikitonia
      @saikitonia 6 месяцев назад +1

      hmm i can only WONDER who is under the blur....

    • @casultaser
      @casultaser 6 месяцев назад

      @@saikitonia Yes, I too WONDER that.

    • @gdplayer1035
      @gdplayer1035 6 месяцев назад +1

      hey look, there he is

  • @SpringySpring04
    @SpringySpring04 6 месяцев назад +22

    This is pretty interesting. As a computer science major and a massive fan of Touhou and programming, this really hits the spot!

  • @blara2401
    @blara2401 6 месяцев назад +16

    The constant back and forth between entry level explanations and _"I wrote an NES emulator"_ level madness is beyond hilarious. Great job !

  • @twingemios5139
    @twingemios5139 5 месяцев назад +16

    After taking an assembly class in college these videos actually make sense to me now.

  • @hexagon_
    @hexagon_ 6 месяцев назад +22

    I guessed a lot of how this was done, but going into the details was so fun! I figured you used a black-and-white video because of the color palette limitations, but it's insane how it still just about works with color video. Also, I can't believe you wrote your own cycle-accurate NES emulator as a side-project for this. Insane

  • @Democrab
    @Democrab 6 месяцев назад +13

    14:46 fun fact, this is how PNG compresses images

    • @renakunisaki
      @renakunisaki 5 месяцев назад +6

      It uses Mario tiles? /s

    • @Tauposaurus
      @Tauposaurus Месяц назад +4

      ​@@renakunisaki...Why do you think its called Plumber Nes Graphics?

  • @HappyLeeHL
    @HappyLeeHL 6 месяцев назад +21

    Great video. You're absolutely fantastic at what you do. :D

  • @ItsPietroFelix
    @ItsPietroFelix 6 месяцев назад +10

    i thought you peaked at beating mario 3 in the title screen but GOD DAMN THIS IS FIRE

  • @Fritzafella
    @Fritzafella 4 месяца назад +8

    The headphone warning just before the first audio test is absolute comedy gold.

  • @sixkayjay
    @sixkayjay 5 месяцев назад +2

    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.

  • @kgibbershnoxss
    @kgibbershnoxss 6 месяцев назад +7

    Cute seeing WinForms used in 2024
    Love to see more videos combining programming and speedrunning

  • @Lemony123
    @Lemony123 6 месяцев назад +13

    This is unironically the first video I watch in 1440p

  • @ferando
    @ferando 4 месяца назад +3

    I have an incredible admiration towards you and everyone else that has enough brain to engineer all this. I would not in a thousand years come up with something as incredibly complex as this. Thank you for making computers fun.

  • @NaraSherko
    @NaraSherko 6 месяцев назад +27

    Now make it run your video

  • @HedgehogGolf
    @HedgehogGolf 5 месяцев назад +5

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

  • @FireNLightnin
    @FireNLightnin 6 месяцев назад +4

    this video was insane. The whole time, I just could not believe you put so much time into making this work so well.

  • @kalandillon8320
    @kalandillon8320 5 месяцев назад +3

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

  • @Fritzafella
    @Fritzafella 6 месяцев назад +5

    15:05
    Litterally my first thought was, you were inspired by Pokemon Sprite Decompression. Absolutely love seeing another video deal with that.
    Nust love this deep dive in general!

  • @marlee_goat
    @marlee_goat 6 месяцев назад +29

    all of your content is so high quality how arent you more popular ...

    • @luimu
      @luimu 6 месяцев назад +1

      way too niche and technical content to reach mainstream interest

    • @trulyhuman6227
      @trulyhuman6227 6 месяцев назад

      Have you been out there? 😂 It's idiocracy....literally. We got to stay together. ❤

  • @LucasBNagy
    @LucasBNagy 6 месяцев назад +5

    that intro to the audio chapter, fucking great so seamless

  • @WM_Nonsense
    @WM_Nonsense 6 месяцев назад +21

    Great video! I’ve seen so many other people talk about ACE but no one really explains fully how it works. But I do have a question, if you had not swapped a cartridge but did have a cheat code or something to get to world N, could you write/execute code?

    • @100thCoin
      @100thCoin  6 месяцев назад +10

      If you use cheats, like a game genie, to reach world 'N', you could still defeat bowser and execute whatever data exists at address $0181. The issue though, is that's uninitialized RAM, and since SMB1 doesn't write there under normal gameplay, it's going to simply have whatever pattern is used by the console's "resting state", which is usually "00 00 00 00 FF FF FF FF FF FF FF FF 00 00 00 00", which will lead to a 'BRK' instruction, moving the PC to the location determined by the interrupt vector, which SMB1 doesn't use, so the game crashes.
      If you have a massive list of game genie codes, you could use those to replace some of SMB1's data with code that writes data at address $0181 though!
      The best alternative would be world 0xFC (found by negative_seven), which would execute RAM at address $03D0, which isn't impossible to manipulate, but the bytes that you could control simply aren't enough to prevent a game crash, as far as I can tell. These bytes are "masking flags" SMB1 uses to check if objects are off screen. For instance, Mario is composed of 8 objects. if half of mario is over the screen (leaving just his feet on screen) then half of the bits in one of these bytes will be set. I haven't looked into it all that much, but I wasn't able to form a jump instruction, so I looked elsewhere, and found world 'N'.

  • @ncrecc6040
    @ncrecc6040 6 месяцев назад +41

    30:42 video quality level: pareidolia

  • @Mr_Doon
    @Mr_Doon 6 месяцев назад +3

    Thanks a ton for describing the details of this project! A lot of RUclipsrs might have resorted to dumbing things down for a general audience, so I'm glad you described things with an introductory level of cs/cpe terms. Who knows, maybe some kid who understands none of this but really likes video games will see this video, become fascinated, and use this video as a sort of gateway drug to kickstart their interest in cs/cpe.

  • @johneygd
    @johneygd Месяц назад +1

    Now that’s actually really interesting.
    Normally the nes cannot play 7bit pcm audio and reading graphics at the same time.
    But by alternating between v-blank or f-blank while sending audio data within that time frame, it became virtually possible to simultaniously play both streamed graphics & digital sounds through the nes😁

  • @burritoman2k
    @burritoman2k 6 месяцев назад +3

    I read through the write-up of this on TASVideos but it went way over my head, this is a much easier way to understand what exactly happens in the tas itself
    P.s. the fantastic fist soundtrack in the background did not go unnoticed

  • @minirop
    @minirop 6 месяцев назад +14

    incredible breakdown, we need more videos that go into the nitty-gritty asm shenanigans 🤩
    and as always "why? why not!"

    • @Ploaper
      @Ploaper 5 месяцев назад +1

      "why?" science isn't about "why?" it's about "why not?"

  • @AjivJabar
    @AjivJabar 6 месяцев назад +6

    so glad to see coin finally getting the recognition he deserves

  • @jrl924dds
    @jrl924dds 5 месяцев назад +2

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

  • @And-So-On
    @And-So-On 6 месяцев назад +3

    22:45 okay but it actually sounded good, you keep impressing me more on as the video goes

  • @2GlitchinAwesome
    @2GlitchinAwesome 2 дня назад +1

    The editing done in your videos is professional, entertaining, and interesting. You have a new subscriber

  • @ssg-eggunner
    @ssg-eggunner 6 месяцев назад +26

    The fact that the entirety of bad apple with good audio quality within the 2kb RAM is beyond me

    • @ReeceTheTroll
      @ReeceTheTroll 6 месяцев назад

      It's not lol

    • @ssg-eggunner
      @ssg-eggunner 6 месяцев назад

      @@ReeceTheTroll explain how is not
      smb in itself is a very simple game and its code takes up 32kb
      you might say visuals ain't that impressive since it reuses tiles from CHR ROM and resolution is very low
      But a whole long 7bit-PCM sample fitting within 2kb of RAM sounds unbelievable

    • @angille
      @angille 6 месяцев назад +16

      it was multiple megabytes of data. the ram only contains the code to read that data streamed through the controller port.
      it's basically like playing Guitar Hero except you're strumming a thousand times a second.

    • @ssg-eggunner
      @ssg-eggunner 6 месяцев назад

      @@angille so It's mostly the CPU working on it?

    • @angille
      @angille 6 месяцев назад +6

      @@ssg-eggunner ...I'm not sure how to explain this any better in a comment than the video already does, lol.

  • @dragonslayerz2220
    @dragonslayerz2220 6 месяцев назад +13

    ...wrote an emulator, what a madman!

  • @Myriadys
    @Myriadys 4 месяца назад +1

    Retro Game Mechanics Explained has a good explanation of open bus (on SNES but i think it's more or less the same) as part of his video "Using Lakitu's Cloud to Defeat Bowser Quickly" if anyone wants to get a general sense of how that works without pausing on that screen.

  • @SireBab
    @SireBab 6 месяцев назад +3

    So much expertise and time spent to produce bad apple in super Mario bros on the nes. I applaud the effort but goddamn man 😂

    • @100thCoin
      @100thCoin  6 месяцев назад +2

      A lot of people will ask "why do this?", because from their perspective this was a waste of time or something, completely missing the point. I'm fascinated by old hardware, and I want to learn more about it. I think making a game that runs on the NES some day would be neat (even if it's not the best financial decision)
      This was an exercise for myself to become more familiar with NES hardware and it's limitations. You might as well do something nobody has ever done before if you really want to prove to yourself that you got everything figured out.

    • @SireBab
      @SireBab 6 месяцев назад +3

      @@100thCoin That's totally valid! Sorry if It came off as condescending. It's impressive as all hell, and I was just surprised it went into such a niche idea. The generic video player playing doom was the chef's kiss of the video in my opinion. It was all amazing, and i'm amazed at the skills involved.

    • @lofwyr5063
      @lofwyr5063 18 дней назад

      Technically, he made an audio/video streaming interface for the NES... not just a bad apple player.
      Hence the doom footage at the end.

  • @Txrje
    @Txrje 6 месяцев назад +2

    This video was a whole out of body experience, incredible lmao

  • @CovenantAgentLazarus
    @CovenantAgentLazarus 6 месяцев назад +2

    Your best work yet by far

  • @JoeyHahn
    @JoeyHahn 4 месяца назад +1

    I'm so glad I got into asm programming for the SNES recently... This isn't way too far off in some ways. The asm code is very similar. Great job!

  • @itztaken
    @itztaken 6 месяцев назад +1

    Absolutely wonderful video. Definitely far surpassed my expectations when I clicked on the video, I wish you a good algorithm ❤

  • @gavinsin7567
    @gavinsin7567 6 месяцев назад +3

    Super good video, love the little jokes and animations. Gave me a good laugh and learned a whole lot! Keep it up! I'd love to see you just take off on RUclips and your games like Fantastic Fist to absolutely pop-off and you get the recognition you deserve!

  • @MarkusIfquil
    @MarkusIfquil 6 месяцев назад +4

    you sound like stryder7x, makes me nostalgic for when i was watching his videos in middle school, anyways great video!

  • @C00PER_06
    @C00PER_06 Месяц назад +1

    I know I'm late to this but this is actually insane lmao. Great work man

  • @Cat_with_helmet
    @Cat_with_helmet 6 месяцев назад +2

    Thank you. I was wandering why do, when I casually play Super Mario Bros in world N after swapping cartridge, the Bad Apple video started.

  • @NotNotGrumm
    @NotNotGrumm 6 месяцев назад +4

    next you gotta play mario bros inside of the bad apple music video

  • @mrnik3
    @mrnik3 6 месяцев назад +1

    that was the best analogy for TAS ive ever seen. great job.

  • @Alexs23743
    @Alexs23743 4 месяца назад +4

    "SEATBELTS, EVERYONE!!!" -Whoever drives the "open bus", probably. Please let it be a normal field trip...

    • @100thCoin
      @100thCoin  4 месяца назад +1

      Please let this be a normal TAS.

  • @StereoBucket
    @StereoBucket 6 месяцев назад +2

    Controller data streaming, one of my absolute favorites.

  • @johnnysvensson
    @johnnysvensson Месяц назад

    Great stuff! Always nice to see Bad Apple run on old hardware like this.

  • @chocolate_maned_wolf
    @chocolate_maned_wolf 6 месяцев назад +1

    Loved the video this was very interesting to watch. I can actually understand a lot of it after playing turing complete and nandgame. This sort of engineering feels adventurous, like you are trying to hack the matrix its so fun

  • @NotBroihon
    @NotBroihon 6 месяцев назад +3

    I originally believed your video was a clever april fools joke. This is incredible!

    • @renakunisaki
      @renakunisaki 5 месяцев назад +1

      The best tech demo jokes are the ones that are also real demos.

  • @LARAUJO_0
    @LARAUJO_0 15 дней назад +3

    30:46 You could've modified these frames to use the letter sprites and show the actual text from the trailer instead of whatever the frame generation program came up with

    • @100thCoin
      @100thCoin  15 дней назад

      Yeah, I probably should have.

  • @Interloper1337
    @Interloper1337 6 месяцев назад +3

    Superb work.

  • @LuwiigiMaster
    @LuwiigiMaster 5 месяцев назад +2

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

  • @AndrewIdot
    @AndrewIdot 6 месяцев назад +2

    you kinda sound like stryder7x
    sick video. creating an entire emulator just to get the audio working was definitely a shocker honestly lol

  • @Grub4K
    @Grub4K 4 месяца назад

    This reminds me a lot of MrWints Pokemon TAS, very similar goal but on two different platforms. Very well done!

  • @VinsCool
    @VinsCool 6 месяцев назад +1

    Simply amazing, I love this stuff!

  • @casev799
    @casev799 6 месяцев назад

    Love that Pixelcraftien is such a popular commenter on literally everything that I can recognize that pfp anywhere

    • @casev799
      @casev799 6 месяцев назад

      18:47 Okay I can't lie, something about 1,000 just feels. Right? Something about it being so simple, idk

  • @spudd86
    @spudd86 6 месяцев назад +2

    For fitting the, tiles viewing the pixels as components of 64 dimensional vector and subtracting them then finding the one where that distance has the smallest magnitude would likely have worked better.

  • @78wurrtrat
    @78wurrtrat 5 месяцев назад +3

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

  • @FLOWRIDER0_
    @FLOWRIDER0_ Месяц назад

    Never knew SMB1 had ACE, just started the vid, excited to see how it works

  • @DarkSparkNova182
    @DarkSparkNova182 6 месяцев назад +3

    This is giving me Stryder7x vibes and I love it

    • @buivars
      @buivars 6 месяцев назад

      I was thinking the exact same thing. I know he's been lurking! Really hoping this might actually be him wearing a fake mustache.

  • @DaveDemers69
    @DaveDemers69 6 месяцев назад +1

    Amazing video, that was really fun to watch.

  • @bearfeet.
    @bearfeet. 6 месяцев назад +3

    A rule of the internet: if it can computer, can bad apple and doom

  • @nmotschidontwannagivemyrea8932
    @nmotschidontwannagivemyrea8932 6 месяцев назад +2

    A bit of detail on how the SMB3 total control thing works to put you into World N, and on what it even means to be in a world that isn't 1 through 8, would have been neat. But considering how much detail you went into, that's really a nitpick. Very cool stuff!

    • @100thCoin
      @100thCoin  6 месяцев назад +2

      I showed ASM code for reading controllers, though let me explain in a bit of detail what's going on. When the console reads from the NES controller, the first step is to "strobe" it. This records whatever buttons are pressed inside a shift register contained on the controller. Then, this data is read one bit at a time through 8 separate read instructions. After a bit is read, the shift register automatically shifts the bits over in preparation for the next bit to be read.
      The nes has two different ways of playing audio samples. PCM, and DPCM. In this video, I covered PCM audio (writing samples to address $4011), so let's talk about DPCM for a minute.
      Instead of manually writing each sample to the audio chip, DPCM audio is handled entirely by this chip! All the programmer needs to do is write to registers to set up the samples length (how many bytes), location (where does the sample begin?) and sample rate (how many samples per second). Then, the audio chip will automatically fetch bytes from the ROM whenever it's time for another sample to be played.
      However, there is a hardware-level malfunction in fetching DPCM samples. If this happens on the same cycle the CPU is also fetching data from the controller, the controller gets "clocked" twice. This results in a single bit being read, yet the shift register will shift over 2 bits, effectively corrupting it. (at least, I'm pretty sure this is what happens...) In any case, DPCM audio samples can corrupt the controller.
      Super mario bros 3 uses DPCM audio samples to play extra drums in the music, so they needed a way to prevent the controllers from being corrupt. Their solution is to read the controllers multiple times in a row. With a bit of math, we can confirm that the controllers will never be corrupt twice in a row. (it takes several hundred cycles between DPCM samples being fetched, but the audio loop only takes about 120 cycles.) SMB3 reads the controllers in a loop until two consecutive reads match.
      The order of operation at the start of a frame in SMB3 is to swap out PRG banks to load code for updating the graphics, update graphics, read the controller, then restore PRG banks to whatever they were before loading in the graphics code. If we were to create a TAS that maliciously has alternating inputs, no two consecutive inputs will match, and the loop will go on forever!
      SMB3's title screen seems to have two layers to it. The moving curtains, and a checkerboard floor that doesn't move. This effect is done by scheduling an interrupt request to happen after 196 scanlines have been rendered, in which case the code that's currently running will briefly be interrupted to run some code for updating the screen, then an RTI instruction will return back to whatever was running before the interrupt.
      However, if we're still inside the controller reading routine when this happens, the wrong PRG banks are loaded! Instead of an RTI instruction, a series of RTS instructions get executed. This eventually leads to address $0001, so now RAM is executed as code. Once the controller reading routine finishes, it stores the data in RAM. I can use these bytes to write code in RAM that gets executed. I begin by making a JMP instruction back to address $0000, so I can continue to execute the first 256 bytes of RAM over and over again. Every frame, SMB3 will once again run the controller reading loop, updating the values in RAM, which I can then execute as code. This lets me carefully write a better input reading loop, which I then execute, allowing me to write anything I want anywhere I want, which I use to set up the payload at address $0181, and manipulate the bytes around $07C0+ to allow SMB1 to begin in world 'N'.

    • @nmotschidontwannagivemyrea8932
      @nmotschidontwannagivemyrea8932 6 месяцев назад +1

      @@100thCoin Wow, thanks!

    • @VinsCool
      @VinsCool 6 месяцев назад +1

      With such an elaborate SMB3 setup, is there any reason why is it not directly used for the entire TAS instead of swapping to a different cartridge?
      Or was it specifically for entertainment purpose that SMB1 was swapped in to be used for the final step?

    • @100thCoin
      @100thCoin  6 месяцев назад +2

      @@VinsCool The end goal is to run ACE inside SMB1. Ideally no cart swapping is needed, though there isn't a known way to do that yet.
      Everyone knows about the SMB3 ACE, though ACE in SMB1 is fairly unheard of. I definitely could have done all this inside SMB3, I would have even had an extra 8 Kibibytes of RAM to work with, though I think the limitations of SMB1 are more interesting.

  • @treacherous-doctor
    @treacherous-doctor 6 месяцев назад +3

    no joke, when I saw the original, I thought to myself, "one day someone's gonna try and run DOOM on this thing". lo and behold, here it is

    • @alessandrorossi1294
      @alessandrorossi1294 6 месяцев назад

      It’s not running doom at all, it’s playing a video recording of doom gameplay

    • @treacherous-doctor
      @treacherous-doctor 6 месяцев назад +1

      @@alessandrorossi1294 I know, he says it in the video

  • @MiirioKing
    @MiirioKing 6 месяцев назад +1

    The people that asked those questions should have read the submission in the description

  • @name123-jq1bf
    @name123-jq1bf 6 месяцев назад +1

    The audio quality is impressive.

  • @LucasWills
    @LucasWills 6 месяцев назад +1

    Excellent explanation, loved this

  • @Lorenz17
    @Lorenz17 6 месяцев назад +2

    Good job on the video. I especially like the segments where you made changes in TAStudio in real time (such as at 14:03) to demonstrate how absolute control works. Its a very intuitive visual, and I imagine recording them without making mistakes and while keeping a pace that could be paired with your commentary wasn't easy.
    I thought of an optimization to the controller reading code at 26:23 that could increase the sample rate and potentially (but probably not) allow the video to be rendered with a resolution of 32x24 tiles. Your method of reading controller inputs only uses standard controllers, and by extension only uses data line D0 (bit 0) of $4016. Consequently, forming a full byte of data takes eight controller pulses, or EOR instructions. If you instead used peripherals as input, you could use four data lines (D0-D3, bits 0-3) and could form a byte in only two pulses with this code:
    EOR $4016
    ASL A
    ASL A
    ASL A
    ASL A
    EOR $4016
    EOR #$40 ; changed to #$40 from #$C0 since only bit 6 will be inverted
    Doing this in the audio code would save 24 CPU cycles per byte (4 per EOR * 6 EORs saved). The code for reading inputs in the 32x24 video would no longer need to be a loop, since this code is small enough to remain unrolled. This would save the CPU cycles that loop overhead introduces. Unfortunately, I still don't think it saves enough cycles to allow all 384 bytes to be written in time, but it could be worth looking into.
    I don't know what capabilities TAStudio has in regards to accessing peripheral slots, but they are accessible on real hardware. According to the expansion port page on the nesdev wiki, the unused expansion port at the bottom on the NES can access all five data lines of both $4016 and $4017 if nothing is plugged into the main controller ports. Therefore, a TAS that used the peripheral slots for input could still be console verified on an NES. Unfortunately, it would lose Famicom support since the Famicom expansion port cannot access every data line.

    • @100thCoin
      @100thCoin  6 месяцев назад +1

      I was talking to people in the TASBot discord, and that's what they were suggesting too. I don't believe TAStudio has the ability to use the peripheral slots? One priority with this TAS was the ability to submit this to TASVideos, so making it work with TAStudio was a limitation.
      Another suggestion I received (that's also not viable in TAStudio) was to never strobe the controller, and exclusively read from the A button, one bit at a time. This would save time in the loops since I no longer need to spend time strobing the controller.
      I'm definitely considering working more on this to get a higher resolution video out of it.

  • @jj8703
    @jj8703 6 месяцев назад +2

    genius way to advertize your game. ngl might actually get it later

  • @nerfytheclown
    @nerfytheclown 6 месяцев назад +2

    I actually want every video I see or make to look like Doom inside Super Mario Bros

  • @AmaroqStarwind
    @AmaroqStarwind 6 месяцев назад +1

    The original famicom has two hard-wired controllers, and adapters exist which turn the expansion slot into two controller ports for American/European NES controllers.
    And all four controllers are read independently, so you could have four controllers providing inputs at the same time. More controllers means more bandwidth!
    The zapper also uses its own thingamajigger compared to normal controllers.

    • @100thCoin
      @100thCoin  6 месяцев назад +1

      I actually improved my audio/graphics interlacing code for the DOOM demonstration to use one controller for audio and another for graphics. They both get strobed simultaneously when writing to $2006, so yeah, that does save a few cycles for each loop!

    • @AmaroqStarwind
      @AmaroqStarwind 6 месяцев назад +2

      @@100thCoin I didn't watch that far into the video yet (assuming it's in the same video). I'm currently multiplexing my attention between multiple unrelated things.

    • @AmaroqStarwind
      @AmaroqStarwind 6 месяцев назад +1

      ⁠@@100thCoin As for the Bad Apple music... Probably could have found a way to use the square and triangle wave channels to reduce the number of PCM samples required. A genetic algorithm or deep learning algorithm might help for generating the necessary NES soundchip data.

    • @renakunisaki
      @renakunisaki 5 месяцев назад +1

      In theory, you can stream an unlimited number of bits on each port. The latch after every 8th is to reset the controller so it starts at the first button again. If you have some custom device, you don't need it.

  • @kellymountain
    @kellymountain 6 месяцев назад +2

    wowee. I read the whole tasvideos writeup but this is far more understandable lmao

  • @Zudexa
    @Zudexa 6 месяцев назад +3

    Doom can be played on *anything*

  • @B3Band
    @B3Band 5 месяцев назад +2

    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
      @100thCoin  5 месяцев назад +3

      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.

  • @summunkid
    @summunkid 6 месяцев назад +4

    i like how this video is in 4:3

    • @100thCoin
      @100thCoin  6 месяцев назад +2

      I didn't plan that, but now that you mention it I could render my own video inside SMB1! Any 4:3 video will work.

  • @ShinySalazzle
    @ShinySalazzle Месяц назад

    Bro I literally watched that yesterday and this is recommended to me right now wtf
    RUclips algorithm is actually competent for once.

  • @MTR-Journeys
    @MTR-Journeys 6 месяцев назад +25

    Bad Apple is the new Doom

    • @TheRealMooCow
      @TheRealMooCow 6 месяцев назад +5

      Bad apple is just doom easy mode

    • @TheGameBoyss
      @TheGameBoyss 6 месяцев назад +5

      They coexist

    • @LennyQUMFIF
      @LennyQUMFIF 6 месяцев назад

      Nah, Bad Apple is Doom’s Japanese Cousin.
      I am aware that someone made Bad Apple in DooM’s MIDI, so Bad Apple in DooM, and technically PART of DooM in Bad Apple

  • @Patralgan
    @Patralgan Месяц назад +1

    It would be wild to be able to play at least one level of Doom inside Super Mario Bros. Even with extremely crusty graphics

  • @mm3shadowman982
    @mm3shadowman982 5 месяцев назад +1

    A TAS within a TAS, brilliant

  • @Gustyguy
    @Gustyguy 4 месяца назад +1

    THIS WAS AMAZING!!!

  • @casinatorzcraft
    @casinatorzcraft 6 месяцев назад +1

    Woah, can't remember the last time I saw a new 4:3 youtube video

  • @elmitudou
    @elmitudou 6 месяцев назад +2

    absolutely amazing video. remember me when you hit a million subs

  • @shadygrove424
    @shadygrove424 6 месяцев назад +1

    lovely video, informative and entertaining. thx