The example on the last few pages of the first PDF I linked (a few posts above) shows how the register is written and comments are included.
Apparently some Needhams programmers can program these, so there must also be a parallel programming method. You might want to research that as well just in case. This is hearsay, so keep that in mind.
I understand the mode selection, but when it fetches a "vector table" I am not so sure what that means.
This below is the instructions straight from the datasheet
When the MC68701U4 is released from reset in mode 0, a
vector is fetched from location $BFFE:$BFFF.
- So it fetches a vector (instruction?) from those 2 adresses? or all inside that area?
Each vector is a 16-bit address pointing to different parts of your program. Reset points to the start.
This provides
a method for an external program to obtain control of the
microcomputer with access to every location in the EPROM.
- Ok, so here it must mean that now PRObug can somehow interact with the MCU? (or viceversa)
I have never used PRObug and don't know anything about it. Consult the manual if you can find one.
To program the EPROM, it is necessary to operate the
MC68701 U4 in mode 0 under the control of a program resident
in external memory which can facilitate loading and programming
of the EPROM.
- Allright, this must be PRObug? But how can the external memory controll the MCU?
I assume it could be PRObug but really could be anything. The MCU is in control of the memory, internal or external.
After the pattern has been loaded
into external memory, the EPROM can be programmed as
follows:
- Ok.. what pattern is getting loaded into what external memory? (sram i suppose)
- Is it here "my code" would get loaded into a external sram? If so, from where does it get loaded into external sram?
External memory contains the software used to program the part (PRObug??) and also the image of what you want to program into the device (your arcade software). Both could be in any type of memory. It really doesn't matter. Normally the software doing the programming is in ROM. The image or pattern in my case has always been RAM but it could have been ROM.
a. Apply programming power (VPP) to the RESET/Vpp
pin.
- ok (haha jeez, well atleast I can probably get this one right).
b. Clear the PLC control bit and set the PPC bit by writing
$FE to the RAM/EPROM control register.
- ok, how would I do that? (cant possibly mean manually right? since its for every single byte..)
It's a micro and can do a lot of things, like program the PPC bit. I would assume PRObug does everything for you. In my case, I just release the reset button and watch the LCD to tell me what is going on.
c. Write data to the next EPROM location to be programmed.
Triggered by an MPU write to the EPROM, internal
latches capture both the EPROM address and the
data byte.
- Now here I dont see what I am supposed to do. How am I supposed to write data?
- Or does it simply mean that it WILL write the data if I trigger a MPU write manually somehow?
Again, this is all done in software by the routine I posted.
d. Clear the PPC bit for programming time, tpp, by writing
$FC to the RAM/EPROM control register and waiting
for time, tpp. This step gates the programming power
(Vpp) from the RESETlVpp pin to the EPROM which
programs the location.
- ok, how would I do that? (cant possibly mean manually right? since its for every single byte..)
Again, this is all done in software by the routine I posted.
e. Repeat steps b through d for each byte to be programmed.
- Will the counter increment automatically?
I would need to look at the routine and am guessing you need to keep track of that. But again, PRObug should do all of this for you.
f. Set the PLC and PPC bits by writing $FF to the
RAM/EPROM control register.
- How would I do that?
g. Remove the programming power (Vpp) from the
RESET IVpp pin. The EPROM can now be read and
verified.
- ok
As you can see there are many points where I cant see how its suposed to be done. :/
I understand the mode selection, but when it fetches a "vector table" I am not so sure what that means.
This below is the instructions straight from the datasheet
When the MC68701U4 is released from reset in mode 0, a
vector is fetched from location $BFFE:$BFFF.
- So it fetches a vector (instruction?) from those 2 adresses? or all inside that area?
To program the EPROM, it is necessary to operate the
MC68701 U4 in mode 0 under the control of a program resident
in external memory which can facilitate loading and programming
of the EPROM.
- Allright, this must be PRObug? But how can the external memory controll the MCU?
After the pattern has been loaded
into external memory, the EPROM can be programmed as
follows:
- Ok.. what pattern is getting loaded into what external memory? (sram i suppose)
- Is it here "my code" would get loaded into a external sram? If so, from where does it get loaded into external sram?
Apparently some Needhams programmers can program these, so there must also be a parallel programming method. You might want to research that as well just in case. This is hearsay, so keep that in mind.
Hello,
the complete MC68701 programmer was described (along with proper firmware) in the old Byte Magazine (Vol. 7, No. 8, 1982)
https://archive.org/details/byte-magazine-1982-08
Authors are from Motorla company.
Hope it helps,
Adam
Hello,
the complete MC68701 programmer was described (along with proper firmware) in the old Byte Magazine (Vol. 7, No. 8, 1982)
https://archive.org/details/byte-magazine-1982-08
Authors are from Motorla company.
Hope it helps,
Adam
You are looking at a .LST (list) file. The .SRC (source file, more likely .ASM) is what you input. The assembler takes the source files and creates the list file for the author and the .S19 file for the programmer hardware device.
.ASM/.SRC are the same as every assembler, although the syntax can vary:
Label Opcode Operand Comment
START LDS #$FF INITIALIZE STACK
You need to do some home work here. But in any event Labels are used as decided by the programmer, "Opcodes" are the instruction mnemonics, the Operands is the argument for the "Opcode" and the Comment is just that. The Operand could be a number expressed as hex, binary, decimal, etc or it may be a label representing said number or it may be an address (like in BASIC). Comments are often preceeded by a semi-colon for most assemblers.
The stuff you see before that on the line are generated by the assembler and represent usually Line Number, Address (AKA location counter), actual opcodes that go in the .S19 "hex" file and then the source line from your input ifle.
You can modify bytes in an S19 file, but you need to be careful and recalculate the line checksums (assuming the programming method you use does anything with them).
The .S19 file is pretty well documented.
Not sure what you are proposing will actually work though.
One thing you can do for one of those steps is to download *any* EPROM programmer software, load the S19 file into it, edit the file in the binary and then save it back as an S19 file. These problems you face are typical of dealing with 30 or 40 year old technology.
If I could just find and edit the places in the s19 file (probug) then I am sure it would work... but I just keep finding hurdle after hurdle.
Trying to rewrite the "programming" program myself is way out of my league. Dont know which programs to use or even get them to run on my pc, not to mention i dont know assembly programming at all.
If I could just find and edit the places in the s19 file (probug) then I am sure it would work... but I just keep finding hurdle after hurdle.
Trying to rewrite the "programming" program myself is way out of my league. Dont know which programs to use or even get them to run on my pc, not to mention i dont know assembly programming at all.Now would be a good time to learn... given that you actually have a goal you can work towards.
I recommend reading the PRObug listing or source code, and see if you can understand what the program is doing. As I mentioned previously, other 6800-family documentation will be very useful for this. Once you understand how it works, only then will you be able to successfully modify it.
B800 JMP (7E) 0xB8CD (Jumps to this adress and do something, then return here and go to next?)
B800 JMP (7E) 0xB8CD (Jumps to this adress and do something, then return here and go to next?)If it were to return and continue, that would be JSR, not JMP.
If an instruction says that it takes for example 3 bytes, like a JMP.. That means including the JMP right? (7E in this case)