You have to make a copy of the version's folder (inside the "versions" folder, named after the version you are modding) and rename it to something else (not matching any version used by Mojang), same for the jar and json files inside it, then open the json and search for "id": "versionname", where "versionname" has to be changed to match the name you used before (note: there is another "id": line which refers to the assets, which is to be left alone). Just before this is a section marked "downloads" (the jsons that I've looked at all have the same general layout, otherwise, search for
"client.jar", without quotes) which must be removed in its entirety (everything from and including "downloads" to but not including the "id": following it):
After (in this case I modded 1.6.4 and the custom version is named TMCWv4):
"assets": "legacy", "id": "TMCWv4",
Note that the json is not formatted with line breaks, even if used in a proper text editor (newer versions of Notepad now recognize Unix line breaks but older version did not); this is likely the most error-prone step in manually installing a mod and the smallest error when editing the json will either cause the launcher to not recognize the version at all or reset it (once you got it working though you can easily reuse it for other mods for the same version by changing the name and "id").
After this you should be able to install the mod normally (add the files to the jar and delete META-INF).
Also, a major issue with old mods is that ModLoader, which many mods used before Forge, appears to be incompatible with the current .minecraft directory structure (it was changed when 1.6 was released) and the game crashes with a "URI is not hierarchical" error; a 3rd party launcher which can replicate the original structure may be needed (I have no experience with this); you also want to run the game in its own directory (or rather, run newer versions in separate directories since versions before 1.6 weren't written to use a different directory) to avoid issues and crashes (e.g. MCL-5837, even if it doesn't crash you'll have to reset the settings each time; more importantly, separate directories reduces the chance of loading a modded/vanilla world in the wrong version, or even being overwritten since e.g. 1.13 may not even recognize a Beta 1.3 save as a world but will overwrite any files in it). There is a patch but I don't know if it will work for Beta 1.3 (only tested for 1.2.5, 1.4.7, 1.5.2, and it is 5 years old. This patch is also said to fix the game not using a different directory other than .minecraft).
You can also fix sounds by copying the assets to the original resources folder (assuming that haven't fixed the issue for older versions yet as there is conflicting information; it seems like they merged a bug report for no sounds in 1.6 with one for older versions, which were due to separate issues and only the 1.6 issue has been fixed):
Create a new folder called "resources" in the ".minecraft" folder (If it doesn't exist)
Copy ALL of the folders from "assets" into "resources".
The sounds work, but there might be no BGM. (It might play. I only played that version for about 2 minutes.)
Custom player skins will require a texture pack, and mods that add custom NPCs using online skins won't work properly (the old skin server was shut down last year; mods/the game would have to be rewritten to use the current server).