Added: 2 months ago
From: Bisqwit
Views: 8,528
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (41)

Sign In or Sign Up now to post a comment!
  • Very impressive! How many years did you work with C++ language?

  • @darkzone4822 I first learned about C++ in ~1995, using Borland C++ 3.1, which was pre-standard. However, I didn't truly begin using C++ until ~1999, when my friend (whose YouTube channel is WarpRulez) showed me a simple program that reads words of text, sorts them, and counts how many times each word appeared. It used STL. It impressed me greatly. The program had no hardcoded limits, and it was only about 10 lines long. After that, C++ has been my primary programming language. No regrets.

  • finally I found a hacker on youtube

  • I meant OS

    

  • @BurnInHell7 Linux. The graphical UI in this video was created in postprocess from the following sources: The DOSBox text output (I run a terminal emulator within DOSBox; within the terminal emulator, the Linux system is accessed); the emulator windows (SDL, as in the source code; though I used a special version of the emulator that outputs raw video into stdout instead); and all custom graphics (UI glue) added by a video processing program I created for this particular video.

  • Which SO do yo use?

  • OK, Now do an NES emulator in Assembly for DOS

    And optimize it to run on the lowest end 386 or 486

    Maybe even a 286

  • @Dakkiller1 Not interested.

  • @Bisqwit +1 on the "not interested part" for optimizing for the 386. Accuracy matters more, not catering to those who still run ancient machines.

  • @jbasniakgm112 Well, I have nothing against people who run/use old machines; in fact, I oppose the culture of always discarding stuff in favor of what's "new" -- it will get us all doomed sooner or later. In my philosophy, if something was good and useful once, and it has not fundamentally changed, it is still good and useful today, even if the world around it has changed. (Note: Not applicable to everything.) But I just don't feel that this particular challenge is one that I want to take.

  • @Bisqwit Wow I very much agree with you on that. I actually have a 500mhz 94meg box that I put arch linux on and used for a few years as one of my desktops. Did everything I wanted it too at the time, the main reason I have a new computer is for newer games but I still use the old machine.

  • How do you know what to code? I mean, to make the emulator work?

  • @McBlasian Programming is not some magic incantations with which to coerce the computer to do work. In programming, one uses a language with which to describe algorithms and program flow. When drawing, how do you know how to move the pen to create images of creations? How do you know which lines and curves to draw? In music, how do you know which notes to play to produce a melody? In programming, it is the same thing. Rules govern it. It is also art. Study the basics, it is rewarding!

  • Do you use classes?

  • @belegulo Not in this program (except for the register files and the APU channels), because of brevity reasons. I had to make the code as small as possible, so that I can show it in 15 minutes like this. If the code had been more verbose, the typing would have had to be faster (to fit it in 15 minutes), and it would have been more difficult to follow it.

  • Um...wait...What?

  • To add keyboard input, replace:

    static FILE* fp = fopen(inputfn, "rb");

    if(fp){ ... }

    With the code that I just posted.

  • @chrisryanwilliams d-pad = wasd, b = ;, a = ', select = right shift, start = return

  • IO::joy_next[0] = 0x0; SDL_Event event; SDL_PollEvent( &event ); Uint8 *keystate = SDL_GetKeyState(NULL); if(keystate[SDLK_d]){IO::joy_n­ext[0] += 0x1;} if(keystate[SDLK_a]){IO::joy_n­ext[0] += 0x2;} if(keystate[SDLK_w]){IO::joy_n­ext[0] += 0x4;} if(keystate[SDLK_s]){IO::joy_n­ext[0] += 0x8;} if(keystate[SDLK_SEMICOLON]){I­O::joy_next[0] += 0x10;} if(keystate[SDLK_QUOTE]){IO::j­oy_next[0] += 0x20;} if(keystate[SDLK_RSHIFT]){IO::­joy_next[0] += 0x40;} if(keystate[SDLK_RETURN]){IO::­joy_next[0] += 0x80;}
  • @chrisryanwilliams Thanks. Managing to post that comment on YouTube is a commendable feat! Too bad the layout was still destroyed.

  • This is awesome, major props. I just have one question: "resample" on line 726 won't run properly on Linux (Ubuntu 11.10, to be specific). It expects different arguments. There is very little information on "resample", so I'm not sure how to fix it.

    Thanks!

  • @chrisryanwilliams Apologies about not specifying which "resample" program I used. It is not the same as installed by Ubuntu's package manager. My "resample" comes from the "streamixer" package. You can replace the "resample mr1789800 r48000" command with this using SoX: "sox -t raw -c1 -2 -s -r1789800 - -t raw -c2 - rate 48000" if you do not want to install streamixer.

  • Be sure to delete the invisible hyphen characters YouTube inserted in the command as I posted it on this form, first, though...

  • .fmv files are actual videos or intructions for tool-assisted videos ?

  • @LunaVorax Different emulators have different file formats: fmv, fcm, vmv, nmv and fm2 are for Famtasia, FCEU, VirtuaNES, Nintendulator and FCEUX respectively, but they all work with the same principle: The file contains list of buttons held down on each frame. At tasvideos org slash 1649M you can download an example fm2 file (in a zip), and study its contents. It is a text file, so open it in e.g. Notepad, after extracting it from the zip. The fmv is simply binary version of that text file.

  • @LunaVorax I used Famtasia format, FMV, simply because it is easy to write a reader for. The format is very simple. The actual FMV file (automatically converted from the corresponding FCM / FM2 file) will not play on Famtasia (it will desync, i.e. the game actors will try to jump at wrong times, bump into enemies, and die). But principally, any TAS is just this: Saved controller input (i.e. buttons state each frame). An emulator simply runs the game and replays the recording of controller input.

  • @Bisqwit Oh, and the reason to why it would desync on Famtasia (or some other emulator) is because Famtasia is not very accurate emulator. It has different timings than more modern emulators, which means that the game will be expecting input at a different time than when the recording is providing it. Sometimes some movies will sync nevertheless.

  • Where is the code at 03:24 located ?

  • @labobo In my Git repository. I will publish it some day. For the time being, it's eyes-only.

  • @Bisqwit But that is precisely why i want to download it. So i can read it in my own pace.

    I couldn't make much sense of it from the video, you scrolled through the code too quickly.

    Btw i asked two questions in the previous video too, did you miss them ?

  • @labobo Sorry. If it is not satisfying for you to read it from this video, then you will have to wait. As of currently the memory access tracker is not release-quality code. I only provided a glance here. You can use the pause button. As for the other questions, I reply whenever I have time, usually in the order of ease of thinking of the wording for the reply. As of now they are already replied to.

  • I was going to get some sleep, then Bisqwit posted a video.

  • Just when I think I've seen it all... Good to see more magic from you again.

    Keep inspiring :)

  • @Louix94 Thanks!

  • You have to delete videos that infringe copyright. I had a GTA video uploaded I could watch but not people from another country. In few days/weeks you should be able to upload video longer than 15min.

  • @ZidaneTribal93 There are none. I would not type such moot things.

  • :S

    

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more