From: Spiro Trikaliotis (ml-cbmhackers_at_trikaliotis.net)
Date: 2008-09-04 18:02:11
Hello,
I am no 8250 expert, but I tried it (on VICE, xpet with 8250 as #8):
* On Thu, Sep 04, 2008 at 04:39:09PM +0200 Anders Carlsson wrote:
> Ruud wrote:
>
>> OK. So far we know that m-w and m-e don't work as it should on a 8250.
>
> Did you try several units, in case the one you used would have some minor
> fault otherwise not detected?
* On Thu, Sep 04, 2008 at 10:04:54AM +0200 I wrote:
> * On Thu, Sep 04, 2008 at 08:50:16AM +0200 ruud.baltissen@apg.nl wrote:
>
> > Running the same program on a PET:
> [...]
> > 100 open1,8,15
> > 200 for i=0 to 15 : print i;
> > 210 print#1,"m-w" chr$(i) chr$(18) chr$(1) chr$(i) : next
> > 240 print : print 400 for i=0 to 15
> > 410 print#1,"m-r" chr$(i) chr$(18)
> > 420 get#1,a$ : if a$="" then a$=chr$(0)
> > 430 print asc(a$);" "; : next
> > ready.
> > run
> > 0 1
>
With VICE, I recognized that even the first M-W was not executed -
whatever was there before running the program still remained there. So,
I tried to analyse it better. For this, I used the ROM listing from
http://www.zimmers.net/anonftp/pub/cbm/firmware/drives/old/8050/d/8250rom.dis)
If running the first PRINT# statement "by hand", I can see that $D30E in
the 8250 is called (I set a breakpoint in VICE). The routine writes the
destination address to $04/05 (in $D318, $D31D). Then it tests for
"M-R"; no, thus, it executes
D328 20 A7 FA JSR killp_rotection
This call does not return at all.
It executes the following routine:
FAA7 killp_rotection:
FAA7 48 PHA
FAA8 A9 01 LDA #$1
FAAA 8D AB 10 STA killp_flag
FAAD killp00:
FAAD AD AB 10 LDA killp_flag
FAB0 D0 FB BNE killp00
FAB2 LFAB2:
FAB2 68 PLA
FAB3 60 RTS
Obviously, it waits for the FDC to set killp_flag ($10AB) to 0, but this
never happens.
Looking at the ROM dump of the FDC
(http://www.zimmers.net/anonftp/pub/cbm/firmware/drives/old/8050/d/8250romfdc.dis),
there is only one place with killp_flag is changed:
FFCF LFFCF:
FFCF 4E AB 04 LSR killp_flag_fdc
FFD2 68 PLA
FFD3 85 82 STA io_riot80_pb_fdc
FFD5 68 PLA
FFD6 AA TAX
FFD7 68 PLA
FFD8 40 RTI
Obviously, this is the end of an IRQ or an NMI routine. I suspect IRQ,
as $FF3F is the IRQ routine, and it is very nearby.
Perhaps, someone with more in-depth knowledge of the 8250 can help here?
Does this ring a bell for anyone?
Regards,
Spiro.
"Anybody who would spend considerable effort emulating a C64 is not
particularly sane to begin with; it is unreasonable to expect them to produce
sane software."
("asuffield" in http://forums.thedailywtf.com/forums/p/7199/134136.aspx)
--
Spiro R. Trikaliotis http://opencbm.sf.net/
http://www.trikaliotis.net/ http://www.viceteam.org/
Message was sent through the cbm-hackers mailing list
Archive generated by hypermail pre-2.1.8.