Skip to content

Commit

Permalink
passivate shared memory experiment, docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mortenjc committed Nov 16, 2024
1 parent bab8485 commit 5847bcb
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 16 deletions.
10 changes: 3 additions & 7 deletions docs/source/background/datamuseumdisk.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,14 @@ program called **F1**.
- application
- 821008 (v4.9)
- Filecopy
* - COPY
- application
- 821008 (v4.9)
- Filecopy
* - SORT
- application
-
- (might be corrupted)
* - JDC
* - DINDEX
- application
- V01.11.82
- unknown (missing a program disk)
- 810211 (v3.3)
- List floppy contents (by usage)


.. list-table:: Accounting related programs
Expand Down
74 changes: 74 additions & 0 deletions docs/source/background/debugdisk.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,80 @@ Digitised by Mattis Lind?.

Contents of **Felsökningsdiskette** as presented by DINDEX


.. list-table:: Felsōkningsdiskette
:header-rows: 1

* - Filename
- Type
- Date
- Function
* - INDEX
- directory
-
- Housekeeping
* - SCR
- application
-
- write pattern to display
* - DALIGN
- application
-
- disk track alignment (speculation, might not work)
* - PRINT
- application
-
- unknown (might not work)
* - RTCTEST
- application
-
- Periodic beep cauused by timer interrupt
* - CONV
- application
-
- unknown (crashes emulator)
* - PTEST
- application
-
- prints a test pattern
* - DANKB
- application
-
- Switches to danish keyboard (inferred, might not be working)
* - DISPTEST
- application
-
- repeatedly write different patterns to display
* - SWEDKB
- application
-
- Swedish keyboard test - shifts and LEDs (by application menu, might not work)
* - GERMKB
- application
- 06/28/77
- German keyboard test (inferred by filename, might be danish actually)
* - SELKB
- application
-
- unknown (program seems to crash or fail to load)
* - DINDEX
- application
-
- List floppy contents (not working)
* - COPY
- application
-
-
* - ALTER
- application
- 12/09/77 (v2.0)
- Rename, protect, unprotect files (by usage)
* - MTEST
- application
-
- Memory test? (guesswork, not working)


.. code-block:: text
> cd disks/debugdisk
Expand Down
19 changes: 10 additions & 9 deletions src/emulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import disks.datamuseum.image as datamuseum
import disks.fluxsamples.image as fluxsamples
from timeit import default_timer as timer
from multiprocessing import shared_memory
#from multiprocessing import shared_memory

'''
Q1 Emulator
Expand All @@ -30,12 +30,13 @@ def on_write(self, address, value):
self.cpu.exit()

self.cpu.m.memory[address] = value
self.shm.buf[address] = value
#self.shm.buf[address] = value


def __del__(self):
self.shm.close()
self.shm.unlink()
#self.shm.close()
#self.shm.unlink()
pass


def __init__(self, args):
Expand All @@ -58,11 +59,11 @@ def __init__(self, args):
self.cpu.m.set_input_callback(self.io.handle_io_in)
self.cpu.m.set_output_callback(self.io.handle_io_out)

self.shm = shared_memory.SharedMemory(
name="shm_q1",
create=True,
size=65535)
print(self.shm.name)
# self.shm = shared_memory.SharedMemory(
# name="shm_q1",
# create=True,
# size=65535)
# print(self.shm.name)

self.stoppc = 0x1ffff
if "stop" in self.prgobj:
Expand Down

0 comments on commit 5847bcb

Please sign in to comment.