[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
progress on ROM 03 source reconstruction
- Subject: progress on ROM 03 source reconstruction
- From: retrogear <larrygr510@gmail.com>
- Date: Thu, 30 May 2013 16:20:13 -0700 (PDT)
- Complaints-to: groups-abuse@google.com
- Injection-date: Thu, 30 May 2013 23:20:13 +0000
- Injection-info: glegroupsg2000goo.googlegroups.com; posting-host=70.35.104.46; posting-account=jKERDgoAAAC7gLN5mRA-DQeBq0YlQi-t
- Newsgroups: comp.sys.apple2
- User-agent: G2/1.0
You guys probably think I'm insane and I'm starting to feel that way BUT I have all 4 banks of the ROM 03 source compiling and linking !!! Just to backtrack, what I've been doing is working with the System 601 sources and was able to get all of gs/os to compile except the utilities that were written in Pascal. I will get back to that eventually. I got excited when the firmware source turned out to be for the Mark Twain prototype. It appears however that the only prototype code was the FF bank. The supposed ROM tool banks FC,FD and FE were all overwritten with the 601 disk based tools. So then I created 2 separate folders for disk tools and ROM tools and proceeded to reconstruct the entire 256k ROM 03 original source which is mainly commenting out the additions to the code and relocating some blocks. 99% of the ROM code is in the original source. It all compiles and links and the length of the code matches. I am now making a 2nd pass thru the code with a byte comparison program to get an exact byte match. I have found many bugs noted which were not fixed in ROM but patched later in disk tools. I even found one which was documented in the description but not noted at all in the source. An instruction was left out of the ROM code. The notes I added have the word 'BUG' in them:
* 8/31/89
*
* Changed the name of routine do_init to do_StatInit. This is to avoid conflict
* between other defprocs using this same name.
* Fix bug in INIT routine where the justification field from the template
* is not being copied over to the control record. BRC #51450.
do_StatInit PROC EXPORT
*
* Inits the data and value fields in the control record
* using values in the template.
*
* Also looks for the ctlJust field if the pCount is at least 9.
(NOTE: a BUG in ROM 03 would cause this to never happen !!!)
*
* The ctlData field is set to be a reference to the static text
* and the ctlValue field is set to be the size of the static
* text field (if the ref is a pointer).
A0 0028 3 ldy #NewCtlRecord.CtlJust ; init the just word
A9 0000 3 lda #0
97 04 7 sta [<ctlPtr],y
BB 2 tyx ; save offset in x
A0 0000 3 ldy #StatTextTemplate.pCount ; check the p count
****** lda [<ctlParam],y ; missing in ROM 03 - BUG ???
C9 0009 3 cmp #9 ; BUG acc=0
90 08 000E4 2 bcc Fini ; BUG always taken
A0 0020 3 ldy #StatTextTemplate.Just ; move the real value
B7 0F 7 lda [<ctlParam],y ; into place
9B 2 txy ; using saved offset.
97 04 7 sta [<ctlPtr],y
Fini
A9 0000 3 lda #0
AA 2 tax
60 6 rts
Do a monitor list at FD/BCCE. instruction ****** is not there !!! No wonder the ROM 03 was considered to be somewhat unstable.
I have been using the Sheepshaver emulator running OS9 with the MPW IIGS assembler package. I have also been using the free HxD hex editor for Windows which is excellent for byte analysis. More to come !!!
Larry