NFS / ANFS Commented Disassembly?

suggest games that you’ve always wanted to see on acorn platforms
Post Reply
User avatar
KenLowe
Posts: 4699
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

NFS / ANFS Commented Disassembly?

Post by KenLowe »

According to the advanced User Guide, zero page addresses &90–&9F are allocated to the Econet system. I'm trying to establish exactly what these addresses are used for. I've just done a quick and dirty disassembly of DNFS3.00, DNFS3.02, NFS3.34 and ANFS4.18 (using the excellent py8dis tool), and on initial inspection:
  • Neither DNFS3.00 or DNFS3.02 appear to use any addresses in the &90..&9F range
  • NFS3.34 uses addresses &9C and &9F
  • ANFS4.18 uses addresses &96 and &98..&9F
It's quite possible that these addresses are all being used, but have not been properly picked up by py8dis. I've not gone through the disassembly files in any detail, and before going to any effort, I was wondering if anyone else has an annotated disassembly of NFS or ANFS for the beeb that they would be able to share?

What I'm trying to do is patch the loader file (!BOOT) for the level 9 Lancelot adventure game, so it will run from my PiFS. I've discovered that the loader is using the Econet allocated addresses &90..&93 and &9A..&9E. More specifically, I've found that the loader &9A address is being 'corrupted' by something, which prevents the game from loading. My beeb is using DNFS3.02, and given my disassembly above, I'm not sure if this is what's causing the corruption. I modified the loader file to use address &97 instead, but that didn't work either. So, I then tried address &66, and with that address everything is loading up and running just fine. Loading and saving is also working nicely.

However, I'm conscious that the loader is still using some other addresses in the econet allocated &90..&9F address range, so there's still a risk of corruption. That's what I want to understand.

TIA!
User avatar
hoglet
Posts: 12682
Joined: Sat Oct 13, 2012 7:21 pm
Location: Bristol
Contact:

Re: NFS / ANFS Commented Disassembly?

Post by hoglet »

Quickly scanning the original DNFSv300 sources, it looks like at leas &99 and &9A are used:
https://github.com/stardot/AcornDNFSv30 ... NFS00#L208

Edit: and also &97:
https://github.com/stardot/AcornDNFSv30 ... NFS00#L253

Dave
User avatar
KenLowe
Posts: 4699
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: NFS / ANFS Commented Disassembly?

Post by KenLowe »

Thank you for the pointers, and for confirming that these addresses are actually in use. That forced me to go back and look at my disassembly...

...and, massaging the DNFS3.00 py8dis control file a little bit reveals the following addresses being used. There may well be others:

Code: Select all

l0097               = &0097
l0098               = &0098
l009a               = &009a
l009b               = &009b
l009c               = &009c
l009e               = &009e
l009f               = &009f
User avatar
jgharston
Posts: 5340
Joined: Thu Sep 24, 2009 12:22 pm
Location: Whitby/Sheffield
Contact:

Re: NFS / ANFS Commented Disassembly?

Post by jgharston »

REM Econet Workspace at &90-&9F
REM ---------------------------
REM &0090-6 unused
REM &0097 = old ACCCON state (Master)
REM &0098 = b7 = respond to Escape
REM &0099 = b7 = need to release Tube
REM &009A/B => Current NetTx control block
REM &009C/D => First page of private workspace - NFS and Econet info
REM &009E/F => Second page of private workspace - receive buffers
REM Doesn't use &0DF0,X as workspace pointer
REM
REM NMI Workspace at &A0-&A7
REM ------------------------
REM &00A0/1 => block to be transmitted
REM &A2-&A5 = length of something

REM check &00A2/3 = length of open port buffer
REM check &00A4/5 => open port buffer
REM check &00A6 = offset into open receive buffers
REM check &00A7
REM
REM Command workspace at &A8-&AF (saved and restored)
REM -------------------------------------------------
REM &00A8 = Y during service call
REM &00A9 = ROM service number (7=osbyte, 8=osword)
REM
REM Filing System Workspace at &00B0
REM --------------------------------
REM &BB = X store
REM &BC = Y store
REM (&BB) => control block
REM &BD = A store
REM (&BE) => command string
REM
REM Filing System Workspace at &00C0
REM --------------------------------
REM check &00C0-&00CB NetTx control block for NetFS_Op
REM check &00CC
REM check &00CD
REM check &00CE
REM check &00CF
REM
REM NMI Workspace at &0D00
REM ----------------------
REM &0D00 NMI code
REM
REM &0D20-&0D26 Scout/Acknowledge packet
REM &0D20 Destination Station
REM &0D21 Destination Network
REM &0D22 Source Station (ie, this station)
REM &0D23 Source Network
REM &0D24 Control Byte
REM &0D25 Port
REM
REM &0D3D-&0D44 Received scout
REM &0D3D Station
REM &0D3E Network
REM &0D3F Control Byte
REM &0D40 Port
REM &0D41-4 Remote Address
REM &0D41-8 Broadcast data
REM
REM &0D49
REM &0D4A &40 if receiving a broadcast
REM &0D4B
REM &0D4C
REM &0D4D
REM &0D4E
REM &0D4F
REM
REM &0D50
REM &0D51 Saved System VIA setting
REM &0D52
REM &0D58-&0D5B Saved RemoteAddress during RemoteCall
REM &0D5C
REM &0D5D
REM &0D5E
REM &0D5F
REM
REM Econet Workspace at &0D60
REM -------------------------
REM &0D60
REM &0D61
REM &0D62 b7=Transmission in progress
REM &0D63 Protection mask
REM &0D64 b7=Rx at &00C0, b6=?, b2=Halted
REM &0D65 Saved protection mask
REM &0D66 b7=Econet using NMI code
REM &0D67 b7=Tube present

https://mdfs.net/Info/Comp/Acorn/Source/Filing.htm

Code: Select all

$ bbcbasic
PDP11 BBC BASIC IV Version 0.45
(C) Copyright J.G.Harston 1989,2005-2024
>_
User avatar
KenLowe
Posts: 4699
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: NFS / ANFS Commented Disassembly?

Post by KenLowe »

That's brilliant. Thank you for that!
Post Reply

Return to “new ideas wishlist & general chat”