-
Notifications
You must be signed in to change notification settings - Fork 0
/
Usage.txt
56 lines (28 loc) · 2.48 KB
/
Usage.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
6502d.py usage notes. Mar 16, 2017.
1. I don't know anything about Python. If it doesn't work, I won't know why.
2. Works with Python 3 on Windows
3. This can and WILL erase files, if they are named the same as your .nes file with extension .bin or .chr or .asm
-Copy the .nes file in an EMPTY folder before attempting this. REALLY! I MEAN IT!
How to use...
Shift-Right Click on the .NES file and choose "Copy as Path".
Open the 6502d.py file in a text editor, and paste the path on top of the current entry at line 34...
path = r"C:\Users\Doug\Desktop\PowerPak\test.nes"
Make sure there is an r in front of the starting quote.
Open command line, and (assuming you have python 3 installed)...type
6502d.py
If the file is a good .NES file, and the filesize matches the header, it should ask you...
Default Program Bank size OK? Y/N
-if type anything other than 'Y' or 'y'
"1 = 8192, 2 = 16384, 4 = 32768:"
It really doesn't make much difference, except that you will generate more .asm files with a smaller Bank size, but they should all assemble the same.
It should generate a .bin file (=the PRG ROM minus the header, not needed for reassembly), a .chr file (if present), and 1 or more .asm file
Assemble with asm6 like this (using the test.nes)
asm6 test.asm test.nes
(that's it)
Troubleshooting...
The very first .nes file I tested...Failed the filesize check. Whoever dumped the ROM, put about 64 bytes at the end of the file, a signature. You would have to open the ROM in a hex editor and delete that part to get it to function...or maybe edit the source code.
Also, if there is a signature in the header (DISKDUDE, etc), my program will not copy it, but remove it. The ROM will run the same, but it's hash value will be different (for comparison / security). I also didn't implement any iNES 2.0 stuff...those bytes will be zero.
You may have to edit the .base directives in the main .asm file. Especially if you are editing the source in the file. Do NOT assume that my program has any idea about what address each bank should start with.
You may have to remove spaces from the .nes filename, before disassembling. The file would probably disassemble correctly, but, asm6 will give error messages for filenames with spaces in them.
I didn't use any illegal opcodes. Feel free to edit the source, if you want them in.
Feel free to use this, change the source code, etc. I'd appreciate if you credit me somewhere in the new version. Thanks. Dougeff.