-
Posts
80 -
Joined
-
Last visited
Profile Information
-
Location
Michigan
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
Techman's Achievements
Star Raider (3/9)
48
Reputation
-
-
Interesting, you have a cap in C4 (far side in the middle), my board has 10K resistor.
-
The interrupts are sent to the internal RS232 ring, and then the software looks at the UART to see what needs handling. -tim
-
Correct. As I recall the connection back to the serial port was used to trigger an interrupt so that the driver code didn’t need to poll the UARTS on the dc-port. Also MBBS 3.0 has the driver integrated and does not (and might be in conflict) with the auto folder driver. MBBS embedded the driver because of the needs and optimizations or the task scheduled in the kernel of the BBS
-
Yeah, it’s on the object as a list, the __str__ function just prints the first one. You could change it to do something like {‘,’.join(self.desc)}, {‘\r\n’.join(self.desc)}, or {self.desc[0]}, {self.desc[1]} etc or outside the object with print(item.desc)
-
LOL - Thanks, and you are welcome. Last time I was in Germany was 2010 BTW - here is what your file shows. TCDEMO.ZIP Lastic 2024-03-19 3 20,398 Title: Turbochip Demo MBIDL.ZIP Lastic 2024-03-28 3 161,927 MiracleBoyInDragonLand GOING.ZIP Lastic 2024-04-07 3 202,986 Prod Type: Demo 124BEERS.ZIP Sysop 2023-11-27 0 147,231 124BEERS.TXT 24HD.ZIP Sysop 2023-11-27 0 356,660 24HD.TXT 24H_IN_A.ZIP Sysop 2023-11-27 0 6,001 24H_IN_A.TXT 24HOUR.ZIP Sysop 2023-11-27 0 172,800 24HOUR.TXT 2PLAETZE.ZIP Sysop 2023-11-27 0 360,217 2PLAETZE.TXT 3DMARK2K.ZIP Sysop 2023-11-27 0 336,894 3DMARK2K.TXT 3DMARK99.ZIP Sysop 2023-11-27 0 336,742 3DMARK99.TXT
-
Sorry, I forgot the original question, this will output the top 10 downloads #!/usr/bin/env python3 """ typedef struct _download { char dwn_name[14]; char dwn_logname[20]; DATE dwn_date; TIME dwn_time; long dwn_size; int dwn_count; int dwn_level; /* if '0' then hidden */ unsigned dwn_sigs; int dwn_hidden; int dwn_revs[7]; char dwn_desc[5][80]; } DOWNLOAD; """ import struct from datetime import datetime from dataclasses import dataclass from typing import List @dataclass class Download: name: str uploader: str uploaded: datetime size: int count: int desc: List[str] def __str__(self): return f"{self.name:14} {self.uploader:20} {self.uploaded:%Y-%m-%d} {self.count:>6,} {self.size:>10,} {self.desc[0]} " download_format = ">14s20sHHLhhhh14s80s80s80s80s80s" download_size = struct.calcsize(download_format) def from_cstring(data: bytes) -> str: idx = data.find(b"\x00") if idx != -1: data = data[:idx] return data.decode("utf-8") # define g_hr(p) ((((p) >> 11) & 0x1f) % 12) # define g_min(p) (((p) >> 5) & 0x3f) # define g_sec(p) (((p) & 0x1f) << 1) # define g_pm(time) (((((time) >> 11) & 0x1f) >= 12) ? 'p' : 'a') # define g_yr(p) (((p) >> 9) & 0x7f) # define g_month(p) (((p) >> 5) & 0x0f) # define g_day(p) ((p) & 0x1f) def from_atari_datetime(date: int, time: int) -> datetime: month = (date >> 5) & 0x0F day = date & 0x1F year = ((date >> 9) & 0x7F) + 1980 hour = (time >> 11) & 0x1F min = time >> 5 & 0x3F sec = (time & 0x1F) << 1 return datetime(year=year, month=month, day=day, hour=hour, minute=min, second=sec) def main(): with open("DOWNLOAD.BBS", "rb") as fd: results = [] while True: record_data = fd.read(download_size) if not record_data: break record = struct.unpack(download_format, record_data) dwn_name = from_cstring(record[0]) dwn_logname = from_cstring(record[1]) dwn_date = from_atari_datetime(record[2], record[3]) dwn_size = record[4] dwn_count = record[5] dwn_level = record[6] # if '0' then hidden dwn_sigs = record[7] dwn_hidden = record[8] dwn_desc = [] for idx in range(0, 5): dwn_desc.append(from_cstring(record[10 + idx])) pass item = Download( name=dwn_name, uploader=dwn_logname, uploaded=dwn_date, size=dwn_size, count=dwn_count, desc=dwn_desc, ) results.append(item) results = sorted(results, key=lambda x: x.count, reverse=True) for item in results[:10]: print(item) if __name__ == "__main__": main()
-
Here is download. #!/usr/bin/env python3 """ typedef struct _download { char dwn_name[14]; char dwn_logname[20]; DATE dwn_date; TIME dwn_time; long dwn_size; int dwn_count; int dwn_level; /* if '0' then hidden */ unsigned dwn_sigs; int dwn_hidden; int dwn_revs[7]; char dwn_desc[5][80]; } DOWNLOAD; """ import struct from datetime import datetime download_format = ">14s20sHHLhhhh14s80s80s80s80s80s" download_size = struct.calcsize(download_format) def from_cstring(data: bytes) -> str: idx = data.find(b"\x00") if idx != -1: data = data[:idx] return data.decode("utf-8") # define g_hr(p) ((((p) >> 11) & 0x1f) % 12) # define g_min(p) (((p) >> 5) & 0x3f) # define g_sec(p) (((p) & 0x1f) << 1) # define g_pm(time) (((((time) >> 11) & 0x1f) >= 12) ? 'p' : 'a') # define g_yr(p) (((p) >> 9) & 0x7f) # define g_month(p) (((p) >> 5) & 0x0f) # define g_day(p) ((p) & 0x1f) def from_atari_datetime(date: int, time: int) -> datetime: month = (date >> 5) & 0x0F day = date & 0x1F year = ((date >> 9) & 0x7F) + 1980 hour = (time >> 11) & 0x1F min = time >> 5 & 0x3F sec = (time & 0x1F) << 1 return datetime(year=year, month=month, day=day, hour=hour, minute=min, second=sec) def main(): with open("DOWNLOAD.BBS", "rb") as fd: while True: record_data = fd.read(download_size) if not record_data: break record = struct.unpack(download_format, record_data) dwn_name = from_cstring(record[0]) dwn_logname = from_cstring(record[1]) dwn_date = from_atari_datetime(record[2], record[3]) dwn_size = record[4] dwn_count = record[5] dwn_level = record[6] # if '0' then hidden dwn_sigs = record[7] dwn_hidden = record[8] dwn_desc = [] for idx in range(0, 5): dwn_desc.append(from_cstring(record[10 + idx])) pass dwn_date = dwn_date.strftime("%Y-%m-%d %H:%M:%S") item = ( dwn_name, dwn_logname, dwn_date, dwn_size, dwn_count, dwn_level, dwn_sigs, dwn_hidden, dwn_desc[0], dwn_desc[1], dwn_desc[2], dwn_desc[3], dwn_desc[4], ) print(item) if __name__ == "__main__": main()
-
Here you go for for lastcall.bbs #!/usr/bin/env python3 """ ypedef struct _lastcall { int lst_spare; /* user number */ char lst_logname[20]; /* users logname */ DATE lstday; /* day since 1-1-80 */ TIME lsttime; /* time */ int timeon; /* time on system */ } LASTCALL; """ import struct from datetime import datetime header_format = ">h" header_size = struct.calcsize(header_format) lastcall_format = ">h20sHHh" lastcall_size = struct.calcsize(lastcall_format) def from_cstring(data: bytes) -> str: idx = data.find(b"\x00") if idx != -1: data = data[:idx] return data.decode("utf-8") # define g_hr(p) ((((p) >> 11) & 0x1f) % 12) # define g_min(p) (((p) >> 5) & 0x3f) # define g_sec(p) (((p) & 0x1f) << 1) # define g_pm(time) (((((time) >> 11) & 0x1f) >= 12) ? 'p' : 'a') # define g_yr(p) (((p) >> 9) & 0x7f) # define g_month(p) (((p) >> 5) & 0x0f) # define g_day(p) ((p) & 0x1f) def from_atari_datetime(date: int, time: int) -> datetime: month = (date >> 5) & 0x0F day = date & 0x1F year = ((date >> 9) & 0x7F) + 1980 hour = (time >> 11) & 0x1F min = time >> 5 & 0x3F sec = (time & 0x1F) << 1 return datetime(year=year, month=month, day=day, hour=hour, minute=min, second=sec) def main(): with open("LASTCALL.BBS", "rb") as fd: header_data = fd.read(header_size) record = struct.unpack(header_format, header_data) caller_no = record[0] for caller in range(caller_no, caller_no - 100, -1): offset = ((caller % 100) * lastcall_size) + header_size fd.seek(offset) record_data = fd.read(lastcall_size) if not record_data: break record = struct.unpack(lastcall_format, record_data) logname = from_cstring(record[1]) date = from_atari_datetime(record[2], record[3]) timeon = record[4] print( f"{caller} -> {logname} -> {date:%Y-%m-%d %H:%M:%S} -> {int(timeon/60)}:{timeon % 60}" ) if __name__ == "__main__": main()
-
Please send me a copy of your DOWNLOAD file.
-
Probably not from MCL, I would parse it with python or C and create a file that you are looking for.
-
It’s two bytes + 100 records, lst_spare is not used and is always zero
-
The first two bytes is a counter, followed by 100 records, in a sliding wrapping window.
-
typedef struct _lastcall { i. nt lst_spare; /* user number */ char lst_logname[20]; /* users logname */ DATE lstday; /* day since 1-1-80 */ TIME lsttime; /* time */ i. int timeon; /* time on system */ } LASTCALL;
-
Yup. It’s pretty cool.I bought the dev version, with the intent to contribute to the development. The case I printed from some STL that I found online.