mirror of
https://github.com/TomHarte/CLK.git
synced 2025-09-12 02:24:31 +00:00
Compare commits
607 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
035713b4d3 | ||
|
54b7dc56b5 | ||
|
7fd39f44d0 | ||
|
691292501a | ||
|
a58158ae08 | ||
|
ef09b971fa | ||
|
e07dee380d | ||
|
125bc5baa6 | ||
|
995444b11b | ||
|
8f2384dbfc | ||
|
0cdd1c23ce | ||
|
4765a39759 | ||
|
7f4047772c | ||
|
45c4ca6bec | ||
|
4a573a5aae | ||
|
5125ff6a8c | ||
|
482d3301ce | ||
|
cdeec8ac47 | ||
|
3cef12b53b | ||
|
dd098a16a8 | ||
|
61a175e84a | ||
|
a5bcd38fe8 | ||
|
cad42beef4 | ||
|
5a57958639 | ||
|
260336c1e5 | ||
|
889cb9c78f | ||
|
b90e8f5af3 | ||
|
12361d2854 | ||
|
d307ddfa8e | ||
|
96fd0b7892 | ||
|
6f1db15d7c | ||
|
1854296ee8 | ||
|
515cc5f326 | ||
|
091be7eafe | ||
|
27a19ea417 | ||
|
9a5e9af67c | ||
|
3a493f2428 | ||
|
ca6e34f4b4 | ||
|
e1e68312c4 | ||
|
c7ff2cece4 | ||
|
8e6f4fa36f | ||
|
4d302da9fa | ||
|
e0917dc734 | ||
|
26f82e8143 | ||
|
6518f08bc7 | ||
|
8599123b30 | ||
|
f934a1aa10 | ||
|
81be5f809f | ||
|
8bb94804d4 | ||
|
c3f64e85ce | ||
|
53057aff5d | ||
|
8cad5ac7e9 | ||
|
b4f643f3dd | ||
|
2d659289e8 | ||
|
9883640b63 | ||
|
bc3a0c3c91 | ||
|
4e822347a5 | ||
|
d5650da8c0 | ||
|
d3c77523c3 | ||
|
787a5ce568 | ||
|
91dfd405d1 | ||
|
08c615c493 | ||
|
5483102276 | ||
|
32686d898b | ||
|
4b50c8d96c | ||
|
c1780ee26b | ||
|
46b2db00bc | ||
|
7042e457ab | ||
|
faeec1701f | ||
|
2a75a1f9f2 | ||
|
8c65dccc53 | ||
|
de7c3ba92f | ||
|
ac204aadd2 | ||
|
46fc0d677f | ||
|
2d4f4b0036 | ||
|
c1de00bf9d | ||
|
4639e1c47c | ||
|
5d2c156bc9 | ||
|
357f98f015 | ||
|
62f23ac27c | ||
|
0936646ef9 | ||
|
856c12f46f | ||
|
7489783837 | ||
|
a4f0a4c310 | ||
|
bb1ef114f1 | ||
|
f1610b6407 | ||
|
5e48a4c724 | ||
|
d825c03372 | ||
|
d177549dd6 | ||
|
9d1543401f | ||
|
094eb7e252 | ||
|
95e6726468 | ||
|
8fded8f210 | ||
|
19c4940abd | ||
|
7b1f6b3c53 | ||
|
43042c3737 | ||
|
30b50b8a1b | ||
|
095be3072b | ||
|
91831200d6 | ||
|
8295d4511b | ||
|
df589d9588 | ||
|
b826e1c661 | ||
|
6727e2fe73 | ||
|
ecdcee8d4e | ||
|
8b4a4369c1 | ||
|
eeb06de916 | ||
|
5018d7d577 | ||
|
1ca279d99d | ||
|
8a149a188c | ||
|
076334bc4e | ||
|
e6b45c978c | ||
|
a07615445f | ||
|
41d30c2835 | ||
|
71f1635e23 | ||
|
57df6d9bf7 | ||
|
fd670d5175 | ||
|
39d4c315c8 | ||
|
6487086354 | ||
|
7d6e24b8ed | ||
|
4922073300 | ||
|
778a02324e | ||
|
8e89aa97a0 | ||
|
dfd521e938 | ||
|
d47332adf5 | ||
|
14e7ba8fab | ||
|
e68a356fd0 | ||
|
6e77b8659c | ||
|
00fad7e424 | ||
|
0a65248bf7 | ||
|
9cff26b163 | ||
|
9309d8c3f2 | ||
|
07e96c10d2 | ||
|
d95abc99d9 | ||
|
b83c2615de | ||
|
78a2b27e65 | ||
|
bae594e34c | ||
|
4ded6fceea | ||
|
0e498829f7 | ||
|
ddd090d581 | ||
|
4cd979e5fb | ||
|
2f7a6bb242 | ||
|
3b3b2e61b0 | ||
|
ab4fde9bd7 | ||
|
a9996f0b81 | ||
|
246d34e072 | ||
|
d35efe3f32 | ||
|
ebd1a6b47c | ||
|
83980678a0 | ||
|
201393f87d | ||
|
055eb3873e | ||
|
dc94d58148 | ||
|
0adaec1665 | ||
|
4ee30dc36f | ||
|
54ff2fa01f | ||
|
03c70b49ba | ||
|
4b2d8e13d1 | ||
|
a0c50f0521 | ||
|
b15a865c88 | ||
|
8e5bbbbc71 | ||
|
615ebaf711 | ||
|
0882d2b7ce | ||
|
900195efac | ||
|
b58b962ccf | ||
|
5255499445 | ||
|
d9a2be4250 | ||
|
256e14a8a6 | ||
|
1ab26d4a2f | ||
|
91b2c751af | ||
|
edf7617d1e | ||
|
32666d304f | ||
|
b65f7b4a6a | ||
|
7c4df23c1c | ||
|
a8e60163e1 | ||
|
02ec1b5da6 | ||
|
a9a6aba862 | ||
|
03c6a60f68 | ||
|
8ab688687e | ||
|
bdec32722e | ||
|
ad50e5c754 | ||
|
9c48e44e9e | ||
|
76284eb462 | ||
|
0745c5128a | ||
|
01fbe2d3de | ||
|
9e14c22259 | ||
|
dff0111cd5 | ||
|
e7452b0ea1 | ||
|
61a0f892c4 | ||
|
4ceab01ed4 | ||
|
9908969eea | ||
|
19a78ef1ac | ||
|
4785c1ae84 | ||
|
ef03841efa | ||
|
4747a70ce7 | ||
|
cd986cc2dc | ||
|
c29d5ca4a8 | ||
|
56b49011d6 | ||
|
48c55211e6 | ||
|
72f68f3b0b | ||
|
7b6dddc994 | ||
|
51fbe4e8c5 | ||
|
c148d9ee6c | ||
|
9dfe59a104 | ||
|
b6aae65afd | ||
|
9fed93a771 | ||
|
cdfb68f261 | ||
|
46450bd080 | ||
|
9a25d601f1 | ||
|
fe0834ecda | ||
|
846f745e2c | ||
|
30d40e6f9b | ||
|
f7501b10f7 | ||
|
379c513f8a | ||
|
5a6d77e958 | ||
|
6646039ffe | ||
|
5e0994270f | ||
|
44fc801720 | ||
|
405c61f53d | ||
|
c40acb9406 | ||
|
7778d2a47e | ||
|
96afb245a5 | ||
|
cf0677c30b | ||
|
667614d9de | ||
|
652ede57b3 | ||
|
09a34f880e | ||
|
a9f9be330d | ||
|
39568d2464 | ||
|
10e07a9966 | ||
|
fe00a69136 | ||
|
9d0c2cd67f | ||
|
b5aab442f8 | ||
|
7c010bd1ef | ||
|
1bf898405f | ||
|
c490166b35 | ||
|
e6862364ed | ||
|
cf20c84edd | ||
|
88e776ad5b | ||
|
e79a60f5cd | ||
|
fd4a91ba72 | ||
|
5705ece2a3 | ||
|
c723f20f39 | ||
|
0f7447d539 | ||
|
1a08944854 | ||
|
7b0b06f6df | ||
|
d2ad227a24 | ||
|
71d7982d14 | ||
|
a94dcc12ef | ||
|
b7bfcfa1e3 | ||
|
416ae0ca04 | ||
|
8d66cd4874 | ||
|
a701ba8030 | ||
|
0160908522 | ||
|
cdd0d6d127 | ||
|
65ee745d6e | ||
|
4141dfc353 | ||
|
fb6cd105c3 | ||
|
6ff9168146 | ||
|
7b5e08aab6 | ||
|
c7dd4526c1 | ||
|
066036ccdd | ||
|
7c164453a5 | ||
|
8b31cfeafb | ||
|
2ddaf0afa3 | ||
|
a8a97b4606 | ||
|
a55b63a210 | ||
|
2e4f7cd667 | ||
|
bf257a8d9e | ||
|
c4e66f7a35 | ||
|
efff433aa0 | ||
|
ee60e36a16 | ||
|
841fc3cfaf | ||
|
2a44caea6c | ||
|
0f661928ae | ||
|
0961e5cc2e | ||
|
df621a8205 | ||
|
bfa416ca99 | ||
|
8041b87317 | ||
|
b3000f6350 | ||
|
947baab269 | ||
|
a41ea90ca7 | ||
|
8b3f0d8fd6 | ||
|
bd9740a9a4 | ||
|
3f735e44f1 | ||
|
9e5235fd30 | ||
|
159f3cb780 | ||
|
61469f8e09 | ||
|
71343b5131 | ||
|
82caee6d7d | ||
|
275e75980c | ||
|
2572da872a | ||
|
6934618589 | ||
|
01fd07c372 | ||
|
02f9cf0318 | ||
|
6bc586025a | ||
|
0d34960d60 | ||
|
99b94a31ea | ||
|
b0d4bcd26c | ||
|
248ea52e06 | ||
|
9b51fe3db4 | ||
|
5f95696815 | ||
|
8c9df5556d | ||
|
32495f47b3 | ||
|
23bc561524 | ||
|
fa2cc0f62e | ||
|
a686a167cc | ||
|
8a2468a4fb | ||
|
4cc21a2c20 | ||
|
5350e41da1 | ||
|
e07e6b6954 | ||
|
0a60e38d82 | ||
|
f53b40e127 | ||
|
4df51a00ed | ||
|
3981c4d101 | ||
|
fc3e8f7cef | ||
|
f4d67ec5e6 | ||
|
59aafa6c1e | ||
|
75da46dac5 | ||
|
1f1d380e26 | ||
|
35b3e425be | ||
|
b4535c489d | ||
|
f6bb502e87 | ||
|
6cf825d3d8 | ||
|
f766841fad | ||
|
10e4e7f6c6 | ||
|
1277e56435 | ||
|
4089532f81 | ||
|
9790b4d2e9 | ||
|
ad37c0d2ac | ||
|
b7a1fd4f8f | ||
|
be5362e393 | ||
|
4977c9bc4c | ||
|
e13dbc03da | ||
|
16fec0679b | ||
|
55361b8552 | ||
|
cc67993621 | ||
|
49ba4998d6 | ||
|
03eb381b3b | ||
|
e5161faa43 | ||
|
de78fb7a1c | ||
|
a9ceb5e21a | ||
|
e62b41f615 | ||
|
592e339b70 | ||
|
84a9138df7 | ||
|
6db7c4a8eb | ||
|
213bd09a9c | ||
|
8eb246cdec | ||
|
caacf8e373 | ||
|
c53d42a578 | ||
|
cfc5ef4a3c | ||
|
e78c1bbec9 | ||
|
b1582d33c0 | ||
|
5abcf28a0e | ||
|
4cd57856ce | ||
|
a826fd5c0e | ||
|
7de23ec2aa | ||
|
d7d2957319 | ||
|
fbd81b9930 | ||
|
dacb52403a | ||
|
e008a02b99 | ||
|
9363453720 | ||
|
9c70615fd1 | ||
|
1c78c65816 | ||
|
2a9a68ca53 | ||
|
fb16baab99 | ||
|
54f509c210 | ||
|
5be8e5eff3 | ||
|
29b9f129f6 | ||
|
f41629daae | ||
|
feea6023f4 | ||
|
262d8cd0d9 | ||
|
fbbec04f8c | ||
|
3e4eaee96b | ||
|
5f99a2240d | ||
|
5937387e94 | ||
|
b3099d8e71 | ||
|
7721f74200 | ||
|
fa58cc05f3 | ||
|
c61a9e47b2 | ||
|
148ee266ed | ||
|
8ccec81cc6 | ||
|
668901f71d | ||
|
ad6ad144a5 | ||
|
d5997a30b2 | ||
|
ecc7501377 | ||
|
45262a1a46 | ||
|
3c04e08df2 | ||
|
7c7675179e | ||
|
88ed49a833 | ||
|
0c88e62815 | ||
|
88d34012c4 | ||
|
3be8de6fb0 | ||
|
804fbf5d5f | ||
|
1a68dcbc14 | ||
|
a9a72a767d | ||
|
afc3a8d373 | ||
|
da00e6588c | ||
|
d6376d0ddf | ||
|
1cca711560 | ||
|
552f9196af | ||
|
c6fa72cd83 | ||
|
42edc46887 | ||
|
ec7e343673 | ||
|
69d4d8acb0 | ||
|
a7eab8df22 | ||
|
4247da9118 | ||
|
cfba8aeb89 | ||
|
db26a26926 | ||
|
1551fbeb1f | ||
|
d5c53ca624 | ||
|
b34702e370 | ||
|
8b1543d9c9 | ||
|
e264375a97 | ||
|
fd31d07f41 | ||
|
fac15f5539 | ||
|
6ad88101f1 | ||
|
2768b66d10 | ||
|
d10164be26 | ||
|
ce7ff13bbe | ||
|
c1d2c159f3 | ||
|
d3dbdb153c | ||
|
e7218c0321 | ||
|
48d8fdb875 | ||
|
b387ca921a | ||
|
53c1a322ed | ||
|
0c502fc9cf | ||
|
5d1e3b6c93 | ||
|
7fc16fa2c8 | ||
|
fe6a88c5df | ||
|
7b14df82e0 | ||
|
966b41313d | ||
|
91f1c3322c | ||
|
0b276c5a76 | ||
|
b654c2e170 | ||
|
32c88da6c4 | ||
|
3d19d0816b | ||
|
15da707324 | ||
|
387e8b04f9 | ||
|
4ca47be8a8 | ||
|
f9d9dc68b7 | ||
|
14a8f4511c | ||
|
97d237eed0 | ||
|
20d0406a24 | ||
|
73e843abd3 | ||
|
8d956da65b | ||
|
9b9cdfe937 | ||
|
3dcba9362c | ||
|
2d3a3ada57 | ||
|
143d1d5e35 | ||
|
13b32b269c | ||
|
592cea6a27 | ||
|
e76ca304e6 | ||
|
d77d8df1ac | ||
|
4f35d5dabd | ||
|
e927feb2d6 | ||
|
98f20c57c1 | ||
|
7a88d31fd9 | ||
|
96326411bf | ||
|
4e882e7d4d | ||
|
bff10c1714 | ||
|
cee2484108 | ||
|
93078abe87 | ||
|
8caa1a9664 | ||
|
d7b46ee03c | ||
|
e07b3da983 | ||
|
0f166cee48 | ||
|
08df42d05b | ||
|
2c165c3873 | ||
|
9135402d9e | ||
|
53135ec2c0 | ||
|
4eb8c8dea9 | ||
|
f318bec53c | ||
|
7d84d6909e | ||
|
9224645473 | ||
|
6717771f9a | ||
|
99e0902b74 | ||
|
c7f2805b05 | ||
|
6e1909647b | ||
|
0c7db56e15 | ||
|
3287ca449e | ||
|
53a8f65ecc | ||
|
113035b374 | ||
|
c6e64837c3 | ||
|
82419e6df1 | ||
|
faa76ee017 | ||
|
ffdefb4106 | ||
|
ba7b1c47b9 | ||
|
342b8105c4 | ||
|
367c2b568a | ||
|
0eef2c0d04 | ||
|
c9a065107b | ||
|
cacacc00f6 | ||
|
1b94cfc72c | ||
|
89fd41124f | ||
|
4e3b0ae3c1 | ||
|
9df6d535e2 | ||
|
d545cce276 | ||
|
71b481d3be | ||
|
2710acaae6 | ||
|
d79135ea01 | ||
|
1464011f6f | ||
|
409c8a6859 | ||
|
805ce36592 | ||
|
07fa56c53d | ||
|
28fca80023 | ||
|
08c0ee9ca8 | ||
|
2878ab1578 | ||
|
16f850cbcc | ||
|
b9177e50d3 | ||
|
c3258551d7 | ||
|
ea0799c546 | ||
|
4843b7f7b8 | ||
|
61694c625e | ||
|
64b4b99d48 | ||
|
dad966b551 | ||
|
e46f503641 | ||
|
fc4a1e6ace | ||
|
02b9a20c11 | ||
|
1db4e4caed | ||
|
991e176c85 | ||
|
4a41a6bb85 | ||
|
6229e1049b | ||
|
3cfd6ed109 | ||
|
ad70180edd | ||
|
efd4a83bd2 | ||
|
e13b4ab7c9 | ||
|
fee89cbaad | ||
|
2bdcba437c | ||
|
2c2216afae | ||
|
0823fc32fe | ||
|
091d19caf5 | ||
|
00a7381f08 | ||
|
d494d1e3ee | ||
|
b1c331a1df | ||
|
b1a4fd085b | ||
|
511ab2afe9 | ||
|
30387ad654 | ||
|
5d528ee1f3 | ||
|
96bb4d50ba | ||
|
45f850adae | ||
|
09341ddbe9 | ||
|
eab4274737 | ||
|
49fec1bc10 | ||
|
de164469c4 | ||
|
f595871cd9 | ||
|
ff86cbd48e | ||
|
47bd4dade5 | ||
|
ff8180920f | ||
|
d4f08f0006 | ||
|
1db756063b | ||
|
b44ea31bbf | ||
|
ddccb946ff | ||
|
1f6f30ae9e | ||
|
4b19a3f4ed | ||
|
c39d0ce2f7 | ||
|
cbdf1a941c | ||
|
a340635de5 | ||
|
d62362db1a | ||
|
a0aba69306 | ||
|
765683cd34 | ||
|
93ddf4f0ba | ||
|
8dcccf11bf | ||
|
43353ce892 | ||
|
a698fea078 | ||
|
390d9b0fe1 | ||
|
fd3ff05b17 | ||
|
a5e4c9dd7b | ||
|
37f07dcc5a | ||
|
75bae9a59c | ||
|
1684d88a3b | ||
|
50acbb70da | ||
|
4de1025468 | ||
|
c2506dd115 | ||
|
f8c9aa8e6c | ||
|
e19dc1f067 | ||
|
84776bced1 | ||
|
9162c86e21 | ||
|
88ffcbc62b | ||
|
6aff0b74cd | ||
|
79671890c5 | ||
|
edd4ed307f | ||
|
f786f8a970 | ||
|
a1d10adaa3 | ||
|
7f480e8e56 | ||
|
94b972aaf4 | ||
|
9470775292 | ||
|
93eb63d930 | ||
|
ea81096a43 | ||
|
594045b4e7 | ||
|
1449330ed3 | ||
|
07493a6b18 | ||
|
0310db5f24 | ||
|
ed6d5a7d38 | ||
|
ca7c1bc631 | ||
|
259070c658 | ||
|
e1a7dd9b24 | ||
|
e5945fbb3d | ||
|
247f636988 | ||
|
c58a2ee624 | ||
|
35a1b44c21 | ||
|
fd09f06507 | ||
|
d66b501a99 | ||
|
349f6766ac | ||
|
cd55ed1514 | ||
|
14d4c8accc | ||
|
37bca96bde | ||
|
b0e6ae58c4 | ||
|
0375e47359 | ||
|
8450ad2856 |
58
.github/workflows/build.yml
vendored
58
.github/workflows/build.yml
vendored
@@ -1,18 +1,24 @@
|
|||||||
name: Build
|
name: Build
|
||||||
on: [pull_request]
|
on: [pull_request]
|
||||||
jobs:
|
jobs:
|
||||||
# build-mac-xcodebuild:
|
|
||||||
# name: Mac UI / xcodebuild / ${{ matrix.os }}
|
build-mac-xcodebuild:
|
||||||
# strategy:
|
name: Mac UI / xcodebuild / ${{ matrix.os }}
|
||||||
# matrix:
|
strategy:
|
||||||
# os: [macos-13, macos-14, macos-15]
|
matrix:
|
||||||
# runs-on: ${{ matrix.os }}
|
os: [macos-latest] #[macos-13, macos-14, macos-15]
|
||||||
# steps:
|
runs-on: ${{ matrix.os }}
|
||||||
# - name: Checkout
|
steps:
|
||||||
# uses: actions/checkout@v4
|
- name: Checkout
|
||||||
# - name: Make
|
uses: actions/checkout@v4
|
||||||
# working-directory: OSBindings/Mac
|
- name: Install Xcode
|
||||||
# run: xcodebuild CODE_SIGN_IDENTITY=-
|
uses: maxim-lobanov/setup-xcode@v1
|
||||||
|
with:
|
||||||
|
xcode-version: latest-stable
|
||||||
|
- name: Make
|
||||||
|
working-directory: OSBindings/Mac
|
||||||
|
run: xcodebuild CODE_SIGN_IDENTITY=-
|
||||||
|
|
||||||
build-sdl-cmake:
|
build-sdl-cmake:
|
||||||
name: SDL UI / cmake / ${{ matrix.os }}
|
name: SDL UI / cmake / ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
@@ -31,6 +37,7 @@ jobs:
|
|||||||
sudo apt-get --fix-missing install cmake gcc-10 libsdl2-dev
|
sudo apt-get --fix-missing install cmake gcc-10 libsdl2-dev
|
||||||
;;
|
;;
|
||||||
macOS)
|
macOS)
|
||||||
|
brew uninstall cmake
|
||||||
brew install cmake sdl2
|
brew install cmake sdl2
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@@ -49,6 +56,7 @@ jobs:
|
|||||||
esac
|
esac
|
||||||
cmake -S. -Bbuild -DCLK_UI=SDL -DCMAKE_BUILD_TYPE=Release
|
cmake -S. -Bbuild -DCLK_UI=SDL -DCMAKE_BUILD_TYPE=Release
|
||||||
cmake --build build -v -j"$jobs"
|
cmake --build build -v -j"$jobs"
|
||||||
|
|
||||||
build-sdl-scons:
|
build-sdl-scons:
|
||||||
name: SDL UI / scons / ${{ matrix.os }}
|
name: SDL UI / scons / ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
@@ -85,8 +93,9 @@ jobs:
|
|||||||
jobs=1
|
jobs=1
|
||||||
esac
|
esac
|
||||||
scons -j"$jobs"
|
scons -j"$jobs"
|
||||||
build-qt:
|
|
||||||
name: Qt / ${{ matrix.os }}
|
build-qt5:
|
||||||
|
name: Qt 5 / ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest]
|
os: [ubuntu-latest]
|
||||||
@@ -105,3 +114,24 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
qmake -o Makefile clksignal.pro
|
qmake -o Makefile clksignal.pro
|
||||||
make
|
make
|
||||||
|
|
||||||
|
# build-qt6:
|
||||||
|
# name: Qt 6 / ${{ matrix.os }}
|
||||||
|
# strategy:
|
||||||
|
# matrix:
|
||||||
|
# os: [ubuntu-latest]
|
||||||
|
# runs-on: ${{ matrix.os }}
|
||||||
|
# steps:
|
||||||
|
# - name: Checkout
|
||||||
|
# uses: actions/checkout@v4
|
||||||
|
# - name: Install dependencies
|
||||||
|
# uses: jurplel/install-qt-action@v4
|
||||||
|
# with:
|
||||||
|
# version: '6.8'
|
||||||
|
# archives: qtbase
|
||||||
|
# - name: Make
|
||||||
|
# working-directory: OSBindings/Qt
|
||||||
|
# shell: bash
|
||||||
|
# run: |
|
||||||
|
# qmake -o Makefile clksignal.pro
|
||||||
|
# make
|
||||||
|
@@ -14,7 +14,7 @@ namespace Activity {
|
|||||||
|
|
||||||
class Source {
|
class Source {
|
||||||
public:
|
public:
|
||||||
virtual void set_activity_observer(Observer *observer) = 0;
|
virtual void set_activity_observer(Observer *) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
using namespace Analyser::Dynamic;
|
using namespace Analyser::Dynamic;
|
||||||
|
|
||||||
float ConfidenceCounter::get_confidence() {
|
float ConfidenceCounter::confidence() const {
|
||||||
return float(hits_) / float(hits_ + misses_);
|
return float(hits_) / float(hits_ + misses_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -20,7 +20,7 @@ namespace Analyser::Dynamic {
|
|||||||
class ConfidenceCounter: public ConfidenceSource {
|
class ConfidenceCounter: public ConfidenceSource {
|
||||||
public:
|
public:
|
||||||
/*! @returns The computed probability, based on the history of events. */
|
/*! @returns The computed probability, based on the history of events. */
|
||||||
float get_confidence() final;
|
float confidence() const final;
|
||||||
|
|
||||||
/*! Records an event that implies this is the appropriate class: pushes probability up towards 1.0. */
|
/*! Records an event that implies this is the appropriate class: pushes probability up towards 1.0. */
|
||||||
void add_hit();
|
void add_hit();
|
||||||
|
@@ -17,7 +17,7 @@ namespace Analyser::Dynamic {
|
|||||||
program is handed to an Atari 2600 then its confidence should grow towards 1.0.
|
program is handed to an Atari 2600 then its confidence should grow towards 1.0.
|
||||||
*/
|
*/
|
||||||
struct ConfidenceSource {
|
struct ConfidenceSource {
|
||||||
virtual float get_confidence() = 0;
|
virtual float confidence() const = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -22,10 +22,10 @@ ConfidenceSummary::ConfidenceSummary(
|
|||||||
weight_sum_ = std::accumulate(weights.begin(), weights.end(), 0.0f);
|
weight_sum_ = std::accumulate(weights.begin(), weights.end(), 0.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
float ConfidenceSummary::get_confidence() {
|
float ConfidenceSummary::confidence() const {
|
||||||
float result = 0.0f;
|
float result = 0.0f;
|
||||||
for(std::size_t index = 0; index < sources_.size(); ++index) {
|
for(std::size_t index = 0; index < sources_.size(); ++index) {
|
||||||
result += sources_[index]->get_confidence() * weights_[index];
|
result += sources_[index]->confidence() * weights_[index];
|
||||||
}
|
}
|
||||||
return result / weight_sum_;
|
return result / weight_sum_;
|
||||||
}
|
}
|
||||||
|
@@ -30,7 +30,7 @@ public:
|
|||||||
const std::vector<float> &weights);
|
const std::vector<float> &weights);
|
||||||
|
|
||||||
/*! @returns The weighted sum of all sources. */
|
/*! @returns The weighted sum of all sources. */
|
||||||
float get_confidence() final;
|
float confidence() const final;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const std::vector<ConfidenceSource *> sources_;
|
const std::vector<ConfidenceSource *> sources_;
|
||||||
|
@@ -8,8 +8,8 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../../../../Machines/DynamicMachine.hpp"
|
#include "Machines/DynamicMachine.hpp"
|
||||||
#include "../../../../Configurable/Configurable.hpp"
|
#include "Configurable/Configurable.hpp"
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../../../../Machines/DynamicMachine.hpp"
|
#include "Machines/DynamicMachine.hpp"
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
@@ -8,8 +8,8 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../../../../Machines/DynamicMachine.hpp"
|
#include "Machines/DynamicMachine.hpp"
|
||||||
#include "../../../../Machines/KeyboardMachine.hpp"
|
#include "Machines/KeyboardMachine.hpp"
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
@@ -7,6 +7,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#include "MultiMediaTarget.hpp"
|
#include "MultiMediaTarget.hpp"
|
||||||
|
#include <unordered_set>
|
||||||
|
|
||||||
using namespace Analyser::Dynamic;
|
using namespace Analyser::Dynamic;
|
||||||
|
|
||||||
@@ -27,3 +28,29 @@ bool MultiMediaTarget::insert_media(const Analyser::Static::Media &media) {
|
|||||||
}
|
}
|
||||||
return inserted;
|
return inserted;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MultiMediaChangeObserver::MultiMediaChangeObserver(const std::vector<std::unique_ptr<::Machine::DynamicMachine>> &machines) {
|
||||||
|
for(const auto &machine: machines) {
|
||||||
|
auto media_change_observer = machine->media_change_observer();
|
||||||
|
if(media_change_observer) targets_.push_back(media_change_observer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
using ChangeEffect = MachineTypes::MediaChangeObserver::ChangeEffect;
|
||||||
|
|
||||||
|
ChangeEffect MultiMediaChangeObserver::effect_for_file_did_change(const std::string &name) const {
|
||||||
|
if(targets_.empty()) {
|
||||||
|
return ChangeEffect::None;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::unordered_set<ChangeEffect> effects;
|
||||||
|
for(const auto &target: targets_) {
|
||||||
|
effects.insert(target->effect_for_file_did_change(name));
|
||||||
|
}
|
||||||
|
|
||||||
|
// No agreement => restart.
|
||||||
|
if(effects.size() > 1) {
|
||||||
|
return ChangeEffect::RestartMachine;
|
||||||
|
}
|
||||||
|
return *effects.begin();
|
||||||
|
}
|
||||||
|
@@ -8,8 +8,8 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../../../../Machines/MediaTarget.hpp"
|
#include "Machines/MediaTarget.hpp"
|
||||||
#include "../../../../Machines/DynamicMachine.hpp"
|
#include "Machines/DynamicMachine.hpp"
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
@@ -33,4 +33,15 @@ private:
|
|||||||
std::vector<MachineTypes::MediaTarget *> targets_;
|
std::vector<MachineTypes::MediaTarget *> targets_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct MultiMediaChangeObserver: public MachineTypes::MediaChangeObserver {
|
||||||
|
public:
|
||||||
|
MultiMediaChangeObserver(const std::vector<std::unique_ptr<::Machine::DynamicMachine>> &);
|
||||||
|
|
||||||
|
// Below is the standard MediaTarget::Machine interface; see there for documentation.
|
||||||
|
ChangeEffect effect_for_file_did_change(const std::string &) const final;
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::vector<MachineTypes::MediaChangeObserver *> targets_;
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -19,7 +19,7 @@ template <typename MachineType>
|
|||||||
void MultiInterface<MachineType>::perform_parallel(const std::function<void(MachineType *)> &function) {
|
void MultiInterface<MachineType>::perform_parallel(const std::function<void(MachineType *)> &function) {
|
||||||
// Apply a blunt force parallelisation of the machines; each run_for is dispatched
|
// Apply a blunt force parallelisation of the machines; each run_for is dispatched
|
||||||
// to a separate queue and this queue will block until all are done.
|
// to a separate queue and this queue will block until all are done.
|
||||||
volatile std::size_t outstanding_machines;
|
std::size_t outstanding_machines;
|
||||||
std::condition_variable condition;
|
std::condition_variable condition;
|
||||||
std::mutex mutex;
|
std::mutex mutex;
|
||||||
{
|
{
|
||||||
@@ -33,7 +33,7 @@ void MultiInterface<MachineType>::perform_parallel(const std::function<void(Mach
|
|||||||
if(machine) function(machine);
|
if(machine) function(machine);
|
||||||
|
|
||||||
std::lock_guard lock(mutex);
|
std::lock_guard lock(mutex);
|
||||||
outstanding_machines--;
|
--outstanding_machines;
|
||||||
condition.notify_all();
|
condition.notify_all();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -106,5 +106,5 @@ void MultiTimedMachine::run_for(const Time::Seconds duration) {
|
|||||||
if(machine->get_confidence() >= 0.01f) machine->run_for(duration);
|
if(machine->get_confidence() >= 0.01f) machine->run_for(duration);
|
||||||
});
|
});
|
||||||
|
|
||||||
if(delegate_) delegate_->did_run_machines(this);
|
if(delegate_) delegate_->did_run_machines(*this);
|
||||||
}
|
}
|
||||||
|
@@ -8,9 +8,9 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../../../../Concurrency/AsyncTaskQueue.hpp"
|
#include "Concurrency/AsyncTaskQueue.hpp"
|
||||||
#include "../../../../Machines/MachineTypes.hpp"
|
#include "Machines/MachineTypes.hpp"
|
||||||
#include "../../../../Machines/DynamicMachine.hpp"
|
#include "Machines/DynamicMachine.hpp"
|
||||||
|
|
||||||
#include "MultiSpeaker.hpp"
|
#include "MultiSpeaker.hpp"
|
||||||
|
|
||||||
@@ -60,7 +60,7 @@ public:
|
|||||||
been received.
|
been received.
|
||||||
*/
|
*/
|
||||||
struct Delegate {
|
struct Delegate {
|
||||||
virtual void did_run_machines(MultiTimedMachine *) = 0;
|
virtual void did_run_machines(MultiTimedMachine &) = 0;
|
||||||
};
|
};
|
||||||
/// Sets @c delegate as the receiver of delegate messages.
|
/// Sets @c delegate as the receiver of delegate messages.
|
||||||
void set_delegate(Delegate *const delegate) {
|
void set_delegate(Delegate *const delegate) {
|
||||||
|
@@ -60,24 +60,24 @@ void MultiSpeaker::set_output_volume(const float volume) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MultiSpeaker::speaker_did_complete_samples(Speaker *const speaker, const std::vector<int16_t> &buffer) {
|
void MultiSpeaker::speaker_did_complete_samples(Speaker &speaker, const std::vector<int16_t> &buffer) {
|
||||||
auto delegate = delegate_.load(std::memory_order_relaxed);
|
auto delegate = delegate_.load(std::memory_order_relaxed);
|
||||||
if(!delegate) return;
|
if(!delegate) return;
|
||||||
{
|
{
|
||||||
std::lock_guard lock_guard(front_speaker_mutex_);
|
std::lock_guard lock_guard(front_speaker_mutex_);
|
||||||
if(speaker != front_speaker_) return;
|
if(&speaker != front_speaker_) return;
|
||||||
}
|
}
|
||||||
did_complete_samples(this, buffer, stereo_output_);
|
did_complete_samples(this, buffer, stereo_output_);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MultiSpeaker::speaker_did_change_input_clock(Speaker *const speaker) {
|
void MultiSpeaker::speaker_did_change_input_clock(Speaker &speaker) {
|
||||||
auto delegate = delegate_.load(std::memory_order_relaxed);
|
auto delegate = delegate_.load(std::memory_order_relaxed);
|
||||||
if(!delegate) return;
|
if(!delegate) return;
|
||||||
{
|
{
|
||||||
std::lock_guard lock_guard(front_speaker_mutex_);
|
std::lock_guard lock_guard(front_speaker_mutex_);
|
||||||
if(speaker != front_speaker_) return;
|
if(&speaker != front_speaker_) return;
|
||||||
}
|
}
|
||||||
delegate->speaker_did_change_input_clock(this);
|
delegate->speaker_did_change_input_clock(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MultiSpeaker::set_new_front_machine(::Machine::DynamicMachine *const machine) {
|
void MultiSpeaker::set_new_front_machine(::Machine::DynamicMachine *const machine) {
|
||||||
@@ -87,6 +87,6 @@ void MultiSpeaker::set_new_front_machine(::Machine::DynamicMachine *const machin
|
|||||||
}
|
}
|
||||||
auto delegate = delegate_.load(std::memory_order_relaxed);
|
auto delegate = delegate_.load(std::memory_order_relaxed);
|
||||||
if(delegate) {
|
if(delegate) {
|
||||||
delegate->speaker_did_change_input_clock(this);
|
delegate->speaker_did_change_input_clock(*this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -8,8 +8,8 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../../../../Machines/DynamicMachine.hpp"
|
#include "Machines/DynamicMachine.hpp"
|
||||||
#include "../../../../Outputs/Speaker/Speaker.hpp"
|
#include "Outputs/Speaker/Speaker.hpp"
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
@@ -42,8 +42,8 @@ public:
|
|||||||
void set_output_volume(float) override;
|
void set_output_volume(float) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void speaker_did_complete_samples(Speaker *speaker, const std::vector<int16_t> &buffer) final;
|
void speaker_did_complete_samples(Speaker &, const std::vector<int16_t> &buffer) final;
|
||||||
void speaker_did_change_input_clock(Speaker *speaker) final;
|
void speaker_did_change_input_clock(Speaker &) final;
|
||||||
MultiSpeaker(const std::vector<Outputs::Speaker::Speaker *> &speakers);
|
MultiSpeaker(const std::vector<Outputs::Speaker::Speaker *> &speakers);
|
||||||
|
|
||||||
std::vector<Outputs::Speaker::Speaker *> speakers_;
|
std::vector<Outputs::Speaker::Speaker *> speakers_;
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#include "MultiMachine.hpp"
|
#include "MultiMachine.hpp"
|
||||||
#include "../../../Outputs/Log.hpp"
|
#include "Outputs/Log.hpp"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
@@ -27,7 +27,8 @@ MultiMachine::MultiMachine(std::vector<std::unique_ptr<DynamicMachine>> &&machin
|
|||||||
audio_producer_(machines_, machines_mutex_),
|
audio_producer_(machines_, machines_mutex_),
|
||||||
joystick_machine_(machines_),
|
joystick_machine_(machines_),
|
||||||
keyboard_machine_(machines_),
|
keyboard_machine_(machines_),
|
||||||
media_target_(machines_)
|
media_target_(machines_),
|
||||||
|
media_change_observer_(machines_)
|
||||||
{
|
{
|
||||||
timed_machine_.set_delegate(this);
|
timed_machine_.set_delegate(this);
|
||||||
}
|
}
|
||||||
@@ -52,6 +53,7 @@ Provider(MachineTypes::AudioProducer, audio_producer, audio_producer_)
|
|||||||
Provider(MachineTypes::JoystickMachine, joystick_machine, joystick_machine_)
|
Provider(MachineTypes::JoystickMachine, joystick_machine, joystick_machine_)
|
||||||
Provider(MachineTypes::KeyboardMachine, keyboard_machine, keyboard_machine_)
|
Provider(MachineTypes::KeyboardMachine, keyboard_machine, keyboard_machine_)
|
||||||
Provider(MachineTypes::MediaTarget, media_target, media_target_)
|
Provider(MachineTypes::MediaTarget, media_target, media_target_)
|
||||||
|
Provider(MachineTypes::MediaChangeObserver, media_change_observer, media_change_observer_)
|
||||||
|
|
||||||
MachineTypes::MouseMachine *MultiMachine::mouse_machine() {
|
MachineTypes::MouseMachine *MultiMachine::mouse_machine() {
|
||||||
// TODO.
|
// TODO.
|
||||||
@@ -66,10 +68,10 @@ bool MultiMachine::would_collapse(const std::vector<std::unique_ptr<DynamicMachi
|
|||||||
(machines.front()->timed_machine()->get_confidence() >= 2.0f * machines[1]->timed_machine()->get_confidence());
|
(machines.front()->timed_machine()->get_confidence() >= 2.0f * machines[1]->timed_machine()->get_confidence());
|
||||||
}
|
}
|
||||||
|
|
||||||
void MultiMachine::did_run_machines(MultiTimedMachine *) {
|
void MultiMachine::did_run_machines(MultiTimedMachine &) {
|
||||||
std::lock_guard machines_lock(machines_mutex_);
|
std::lock_guard machines_lock(machines_mutex_);
|
||||||
|
|
||||||
if constexpr (logger.enabled) {
|
if constexpr (logger.InfoEnabled) {
|
||||||
auto line = logger.info();
|
auto line = logger.info();
|
||||||
for(const auto &machine: machines_) {
|
for(const auto &machine: machines_) {
|
||||||
auto timed_machine = machine->timed_machine();
|
auto timed_machine = machine->timed_machine();
|
||||||
|
@@ -8,14 +8,14 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../../../Machines/DynamicMachine.hpp"
|
#include "Machines/DynamicMachine.hpp"
|
||||||
|
|
||||||
#include "Implementation/MultiProducer.hpp"
|
#include "Analyser/Dynamic/MultiMachine/Implementation/MultiProducer.hpp"
|
||||||
#include "Implementation/MultiConfigurable.hpp"
|
#include "Analyser/Dynamic/MultiMachine/Implementation/MultiConfigurable.hpp"
|
||||||
#include "Implementation/MultiProducer.hpp"
|
#include "Analyser/Dynamic/MultiMachine/Implementation/MultiProducer.hpp"
|
||||||
#include "Implementation/MultiJoystickMachine.hpp"
|
#include "Analyser/Dynamic/MultiMachine/Implementation/MultiJoystickMachine.hpp"
|
||||||
#include "Implementation/MultiKeyboardMachine.hpp"
|
#include "Analyser/Dynamic/MultiMachine/Implementation/MultiKeyboardMachine.hpp"
|
||||||
#include "Implementation/MultiMediaTarget.hpp"
|
#include "Analyser/Dynamic/MultiMachine/Implementation/MultiMediaTarget.hpp"
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
@@ -58,10 +58,11 @@ public:
|
|||||||
MachineTypes::KeyboardMachine *keyboard_machine() final;
|
MachineTypes::KeyboardMachine *keyboard_machine() final;
|
||||||
MachineTypes::MouseMachine *mouse_machine() final;
|
MachineTypes::MouseMachine *mouse_machine() final;
|
||||||
MachineTypes::MediaTarget *media_target() final;
|
MachineTypes::MediaTarget *media_target() final;
|
||||||
|
MachineTypes::MediaChangeObserver *media_change_observer() final;
|
||||||
void *raw_pointer() final;
|
void *raw_pointer() final;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void did_run_machines(MultiTimedMachine *) final;
|
void did_run_machines(MultiTimedMachine &) final;
|
||||||
|
|
||||||
std::vector<std::unique_ptr<DynamicMachine>> machines_;
|
std::vector<std::unique_ptr<DynamicMachine>> machines_;
|
||||||
std::recursive_mutex machines_mutex_;
|
std::recursive_mutex machines_mutex_;
|
||||||
@@ -73,6 +74,7 @@ private:
|
|||||||
MultiJoystickMachine joystick_machine_;
|
MultiJoystickMachine joystick_machine_;
|
||||||
MultiKeyboardMachine keyboard_machine_;
|
MultiKeyboardMachine keyboard_machine_;
|
||||||
MultiMediaTarget media_target_;
|
MultiMediaTarget media_target_;
|
||||||
|
MultiMediaChangeObserver media_change_observer_;
|
||||||
|
|
||||||
void pick_first();
|
void pick_first();
|
||||||
bool has_picked_ = false;
|
bool has_picked_ = false;
|
||||||
|
@@ -8,9 +8,9 @@
|
|||||||
|
|
||||||
#include "Disk.hpp"
|
#include "Disk.hpp"
|
||||||
|
|
||||||
#include "../../../Storage/Disk/Controller/DiskController.hpp"
|
#include "Storage/Disk/Controller/DiskController.hpp"
|
||||||
#include "../../../Storage/Disk/Encodings/MFM/Parser.hpp"
|
#include "Storage/Disk/Encodings/MFM/Parser.hpp"
|
||||||
#include "../../../Numeric/CRC.hpp"
|
#include "Numeric/CRC.hpp"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
@@ -9,7 +9,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "File.hpp"
|
#include "File.hpp"
|
||||||
#include "../../../Storage/Disk/Disk.hpp"
|
#include "Storage/Disk/Disk.hpp"
|
||||||
|
|
||||||
namespace Analyser::Static::Acorn {
|
namespace Analyser::Static::Acorn {
|
||||||
|
|
||||||
|
@@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
#include "Tape.hpp"
|
#include "Tape.hpp"
|
||||||
#include "Target.hpp"
|
#include "Target.hpp"
|
||||||
|
|
||||||
#include "../../../Numeric/StringSimilarity.hpp"
|
#include "Numeric/StringSimilarity.hpp"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <map>
|
#include <map>
|
||||||
@@ -167,8 +167,8 @@ Analyser::Static::TargetList Analyser::Static::Acorn::GetTargets(
|
|||||||
// Take whatever else comes with a preference for things that don't
|
// Take whatever else comes with a preference for things that don't
|
||||||
// have 'boot' or 'read' in them (the latter of which will tend to be
|
// have 'boot' or 'read' in them (the latter of which will tend to be
|
||||||
// read_me or read_this or similar).
|
// read_me or read_this or similar).
|
||||||
constexpr char read[] = "read";
|
static constexpr char read[] = "read";
|
||||||
constexpr char boot[] = "boot";
|
static constexpr char boot[] = "boot";
|
||||||
const auto has = [&](const char *begin, const char *end) {
|
const auto has = [&](const char *begin, const char *end) {
|
||||||
return std::search(
|
return std::search(
|
||||||
file.name.begin(), file.name.end(),
|
file.name.begin(), file.name.end(),
|
||||||
|
@@ -8,8 +8,8 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../StaticAnalyser.hpp"
|
#include "Analyser/Static/StaticAnalyser.hpp"
|
||||||
#include "../../../Storage/TargetPlatforms.hpp"
|
#include "Storage/TargetPlatforms.hpp"
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
namespace Analyser::Static::Acorn {
|
namespace Analyser::Static::Acorn {
|
||||||
|
@@ -10,8 +10,8 @@
|
|||||||
|
|
||||||
#include <deque>
|
#include <deque>
|
||||||
|
|
||||||
#include "../../../Numeric/CRC.hpp"
|
#include "Numeric/CRC.hpp"
|
||||||
#include "../../../Storage/Tape/Parsers/Acorn.hpp"
|
#include "Storage/Tape/Parsers/Acorn.hpp"
|
||||||
|
|
||||||
using namespace Analyser::Static::Acorn;
|
using namespace Analyser::Static::Acorn;
|
||||||
|
|
||||||
|
@@ -8,10 +8,10 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <memory>
|
|
||||||
|
|
||||||
#include "File.hpp"
|
#include "File.hpp"
|
||||||
#include "../../../Storage/Tape/Tape.hpp"
|
#include "Storage/Tape/Tape.hpp"
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
namespace Analyser::Static::Acorn {
|
namespace Analyser::Static::Acorn {
|
||||||
|
|
||||||
|
@@ -8,8 +8,8 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../../../Reflection/Struct.hpp"
|
#include "Analyser/Static/StaticAnalyser.hpp"
|
||||||
#include "../StaticAnalyser.hpp"
|
#include "Reflection/Struct.hpp"
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
namespace Analyser::Static::Acorn {
|
namespace Analyser::Static::Acorn {
|
||||||
|
@@ -8,8 +8,8 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../StaticAnalyser.hpp"
|
#include "Analyser/Static/StaticAnalyser.hpp"
|
||||||
#include "../../../Storage/TargetPlatforms.hpp"
|
#include "Storage/TargetPlatforms.hpp"
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
namespace Analyser::Static::Amiga {
|
namespace Analyser::Static::Amiga {
|
||||||
|
@@ -8,8 +8,8 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../../../Reflection/Struct.hpp"
|
#include "Analyser/Static/StaticAnalyser.hpp"
|
||||||
#include "../StaticAnalyser.hpp"
|
#include "Reflection/Struct.hpp"
|
||||||
|
|
||||||
namespace Analyser::Static::Amiga {
|
namespace Analyser::Static::Amiga {
|
||||||
|
|
||||||
|
@@ -8,15 +8,15 @@
|
|||||||
|
|
||||||
#include "StaticAnalyser.hpp"
|
#include "StaticAnalyser.hpp"
|
||||||
|
|
||||||
#include <algorithm>
|
#include "Storage/Disk/Parsers/CPM.hpp"
|
||||||
#include <cstring>
|
#include "Storage/Disk/Encodings/MFM/Parser.hpp"
|
||||||
|
#include "Storage/Tape/Parsers/Spectrum.hpp"
|
||||||
#include "../../../Storage/Disk/Parsers/CPM.hpp"
|
|
||||||
#include "../../../Storage/Disk/Encodings/MFM/Parser.hpp"
|
|
||||||
#include "../../../Storage/Tape/Parsers/Spectrum.hpp"
|
|
||||||
|
|
||||||
#include "Target.hpp"
|
#include "Target.hpp"
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
#include <cstring>
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
bool strcmp_insensitive(const char *a, const char *b) {
|
bool strcmp_insensitive(const char *a, const char *b) {
|
||||||
|
@@ -8,8 +8,8 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../StaticAnalyser.hpp"
|
#include "Analyser/Static/StaticAnalyser.hpp"
|
||||||
#include "../../../Storage/TargetPlatforms.hpp"
|
#include "Storage/TargetPlatforms.hpp"
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
namespace Analyser::Static::AmstradCPC {
|
namespace Analyser::Static::AmstradCPC {
|
||||||
|
@@ -8,9 +8,9 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../../../Reflection/Enum.hpp"
|
#include "Reflection/Enum.hpp"
|
||||||
#include "../../../Reflection/Struct.hpp"
|
#include "Reflection/Struct.hpp"
|
||||||
#include "../StaticAnalyser.hpp"
|
#include "Analyser/Static/StaticAnalyser.hpp"
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
namespace Analyser::Static::AmstradCPC {
|
namespace Analyser::Static::AmstradCPC {
|
||||||
|
@@ -8,8 +8,8 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../StaticAnalyser.hpp"
|
#include "Analyser/Static/StaticAnalyser.hpp"
|
||||||
#include "../../../Storage/TargetPlatforms.hpp"
|
#include "Storage/TargetPlatforms.hpp"
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
namespace Analyser::Static::AppleII {
|
namespace Analyser::Static::AppleII {
|
||||||
|
@@ -8,9 +8,9 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../../../Reflection/Enum.hpp"
|
#include "Analyser/Static/StaticAnalyser.hpp"
|
||||||
#include "../../../Reflection/Struct.hpp"
|
#include "Reflection/Enum.hpp"
|
||||||
#include "../StaticAnalyser.hpp"
|
#include "Reflection/Struct.hpp"
|
||||||
|
|
||||||
namespace Analyser::Static::AppleII {
|
namespace Analyser::Static::AppleII {
|
||||||
|
|
||||||
|
@@ -8,8 +8,8 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../StaticAnalyser.hpp"
|
#include "Analyser/Static/StaticAnalyser.hpp"
|
||||||
#include "../../../Storage/TargetPlatforms.hpp"
|
#include "Storage/TargetPlatforms.hpp"
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
namespace Analyser::Static::AppleIIgs {
|
namespace Analyser::Static::AppleIIgs {
|
||||||
|
@@ -8,9 +8,9 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../../../Reflection/Enum.hpp"
|
#include "Analyser/Static/StaticAnalyser.hpp"
|
||||||
#include "../../../Reflection/Struct.hpp"
|
#include "Reflection/Enum.hpp"
|
||||||
#include "../StaticAnalyser.hpp"
|
#include "Reflection/Struct.hpp"
|
||||||
|
|
||||||
namespace Analyser::Static::AppleIIgs {
|
namespace Analyser::Static::AppleIIgs {
|
||||||
|
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
#include "Target.hpp"
|
#include "Target.hpp"
|
||||||
|
|
||||||
#include "../Disassembler/6502.hpp"
|
#include "Analyser/Static/Disassembler/6502.hpp"
|
||||||
|
|
||||||
using namespace Analyser::Static::Atari2600;
|
using namespace Analyser::Static::Atari2600;
|
||||||
using Target = Analyser::Static::Atari2600::Target;
|
using Target = Analyser::Static::Atari2600::Target;
|
||||||
|
@@ -8,8 +8,8 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../StaticAnalyser.hpp"
|
#include "Analyser/Static/StaticAnalyser.hpp"
|
||||||
#include "../../../Storage/TargetPlatforms.hpp"
|
#include "Storage/TargetPlatforms.hpp"
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
namespace Analyser::Static::Atari2600 {
|
namespace Analyser::Static::Atari2600 {
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../StaticAnalyser.hpp"
|
#include "Analyser/Static/StaticAnalyser.hpp"
|
||||||
|
|
||||||
namespace Analyser::Static::Atari2600 {
|
namespace Analyser::Static::Atari2600 {
|
||||||
|
|
||||||
|
@@ -8,8 +8,8 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../StaticAnalyser.hpp"
|
#include "Analyser/Static/StaticAnalyser.hpp"
|
||||||
#include "../../../Storage/TargetPlatforms.hpp"
|
#include "Storage/TargetPlatforms.hpp"
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
namespace Analyser::Static::AtariST {
|
namespace Analyser::Static::AtariST {
|
||||||
|
@@ -8,8 +8,8 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../../../Reflection/Struct.hpp"
|
#include "Analyser/Static/StaticAnalyser.hpp"
|
||||||
#include "../StaticAnalyser.hpp"
|
#include "Reflection/Struct.hpp"
|
||||||
|
|
||||||
namespace Analyser::Static::AtariST {
|
namespace Analyser::Static::AtariST {
|
||||||
|
|
||||||
|
@@ -8,8 +8,8 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../StaticAnalyser.hpp"
|
#include "Analyser/Static/StaticAnalyser.hpp"
|
||||||
#include "../../../Storage/TargetPlatforms.hpp"
|
#include "Storage/TargetPlatforms.hpp"
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
namespace Analyser::Static::Coleco {
|
namespace Analyser::Static::Coleco {
|
||||||
|
@@ -7,14 +7,14 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#include "Disk.hpp"
|
#include "Disk.hpp"
|
||||||
#include "../../../Storage/Disk/Controller/DiskController.hpp"
|
#include "Storage/Disk/Controller/DiskController.hpp"
|
||||||
#include "../../../Storage/Disk/Encodings/CommodoreGCR.hpp"
|
#include "Storage/Disk/Encodings/CommodoreGCR.hpp"
|
||||||
#include "../../../Storage/Data/Commodore.hpp"
|
#include "Storage/Data/Commodore.hpp"
|
||||||
|
|
||||||
#include <limits>
|
|
||||||
#include <vector>
|
|
||||||
#include <array>
|
#include <array>
|
||||||
|
#include <limits>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
using namespace Analyser::Static::Commodore;
|
using namespace Analyser::Static::Commodore;
|
||||||
|
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../../../Storage/Disk/Disk.hpp"
|
#include "Storage/Disk/Disk.hpp"
|
||||||
#include "File.hpp"
|
#include "File.hpp"
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
@@ -12,11 +12,11 @@
|
|||||||
#include "File.hpp"
|
#include "File.hpp"
|
||||||
#include "Tape.hpp"
|
#include "Tape.hpp"
|
||||||
#include "Target.hpp"
|
#include "Target.hpp"
|
||||||
#include "../../../Storage/Cartridge/Encodings/CommodoreROM.hpp"
|
#include "Storage/Cartridge/Encodings/CommodoreROM.hpp"
|
||||||
#include "../../../Outputs/Log.hpp"
|
#include "Outputs/Log.hpp"
|
||||||
|
|
||||||
#include "../Disassembler/6502.hpp"
|
#include "Analyser/Static/Disassembler/6502.hpp"
|
||||||
#include "../Disassembler/AddressMapper.hpp"
|
#include "Analyser/Static/Disassembler/AddressMapper.hpp"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
@@ -180,9 +180,8 @@ bool obviously_uses_ted(const File &file) {
|
|||||||
analysis->machine_code_addresses
|
analysis->machine_code_addresses
|
||||||
);
|
);
|
||||||
|
|
||||||
// If FF3E or FF3F is touched, this is for the +4.
|
// Check for interrupt status and paging touches.
|
||||||
// TODO: probably require a very early touch.
|
for(const auto address: {0xff3e, 0xff3f, 0xff09}) {
|
||||||
for(const auto address: {0xff3e, 0xff3f}) {
|
|
||||||
for(const auto &collection: {
|
for(const auto &collection: {
|
||||||
disassembly.external_loads,
|
disassembly.external_loads,
|
||||||
disassembly.external_stores,
|
disassembly.external_stores,
|
||||||
@@ -299,7 +298,7 @@ std::unique_ptr<Analyser::Static::Target> get_target<TargetPlatform::Plus4>(
|
|||||||
|
|
||||||
// Attach a 1541 if there are any disks here.
|
// Attach a 1541 if there are any disks here.
|
||||||
target->has_c1541 = !target->media.disks.empty();
|
target->has_c1541 = !target->media.disks.empty();
|
||||||
return std::move(target);
|
return target;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
@@ -392,7 +391,7 @@ std::unique_ptr<Analyser::Static::Target> get_target<TargetPlatform::Vic20>(
|
|||||||
|
|
||||||
// Attach a 1540 if there are any disks here.
|
// Attach a 1540 if there are any disks here.
|
||||||
target->has_c1540 = !target->media.disks.empty();
|
target->has_c1540 = !target->media.disks.empty();
|
||||||
return std::move(target);
|
return target;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -8,8 +8,8 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../StaticAnalyser.hpp"
|
#include "Analyser/Static/StaticAnalyser.hpp"
|
||||||
#include "../../../Storage/TargetPlatforms.hpp"
|
#include "Storage/TargetPlatforms.hpp"
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
namespace Analyser::Static::Commodore {
|
namespace Analyser::Static::Commodore {
|
||||||
|
@@ -7,8 +7,9 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#include "Tape.hpp"
|
#include "Tape.hpp"
|
||||||
|
#include "Storage/Tape/Parsers/Commodore.hpp"
|
||||||
|
|
||||||
#include "../../../Storage/Tape/Parsers/Commodore.hpp"
|
#include <algorithm>
|
||||||
|
|
||||||
using namespace Analyser::Static::Commodore;
|
using namespace Analyser::Static::Commodore;
|
||||||
|
|
||||||
@@ -38,7 +39,7 @@ std::vector<File> Analyser::Static::Commodore::GetFiles(Storage::Tape::TapeSeria
|
|||||||
header = parser.get_next_header(serialiser);
|
header = parser.get_next_header(serialiser);
|
||||||
if(!header) continue;
|
if(!header) continue;
|
||||||
if(header->type != Storage::Tape::Commodore::Header::DataBlock) break;
|
if(header->type != Storage::Tape::Commodore::Header::DataBlock) break;
|
||||||
std::copy(header->data.begin(), header->data.end(), std::back_inserter(new_file.data));
|
std::ranges::copy(header->data, std::back_inserter(new_file.data));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@@ -8,8 +8,8 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../../../Storage/Tape/Tape.hpp"
|
#include "Storage/Tape/Tape.hpp"
|
||||||
#include "../../../Storage/TargetPlatforms.hpp"
|
#include "Storage/TargetPlatforms.hpp"
|
||||||
#include "File.hpp"
|
#include "File.hpp"
|
||||||
|
|
||||||
namespace Analyser::Static::Commodore {
|
namespace Analyser::Static::Commodore {
|
||||||
|
@@ -8,9 +8,9 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../../../Reflection/Enum.hpp"
|
#include "Analyser/Static/StaticAnalyser.hpp"
|
||||||
#include "../../../Reflection/Struct.hpp"
|
#include "Reflection/Enum.hpp"
|
||||||
#include "../StaticAnalyser.hpp"
|
#include "Reflection/Struct.hpp"
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
namespace Analyser::Static::Commodore {
|
namespace Analyser::Static::Commodore {
|
||||||
|
@@ -60,11 +60,11 @@ private:
|
|||||||
bool overrun_ = false;
|
bool overrun_ = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
constexpr uint8_t x(uint8_t v) { return v >> 6; }
|
constexpr uint8_t x(const uint8_t v) { return v >> 6; }
|
||||||
constexpr uint8_t y(uint8_t v) { return (v >> 3) & 7; }
|
constexpr uint8_t y(const uint8_t v) { return (v >> 3) & 7; }
|
||||||
constexpr uint8_t q(uint8_t v) { return (v >> 3) & 1; }
|
constexpr uint8_t q(const uint8_t v) { return (v >> 3) & 1; }
|
||||||
constexpr uint8_t p(uint8_t v) { return (v >> 4) & 3; }
|
constexpr uint8_t p(const uint8_t v) { return (v >> 4) & 3; }
|
||||||
constexpr uint8_t z(uint8_t v) { return v & 7; }
|
constexpr uint8_t z(const uint8_t v) { return v & 7; }
|
||||||
|
|
||||||
Instruction::Condition condition_table[] = {
|
Instruction::Condition condition_table[] = {
|
||||||
Instruction::Condition::NZ, Instruction::Condition::Z,
|
Instruction::Condition::NZ, Instruction::Condition::Z,
|
||||||
@@ -92,7 +92,7 @@ Instruction::Location RegisterTableEntry(
|
|||||||
Instruction &instruction,
|
Instruction &instruction,
|
||||||
const bool needs_indirect_offset
|
const bool needs_indirect_offset
|
||||||
) {
|
) {
|
||||||
constexpr Instruction::Location register_table[] = {
|
static constexpr Instruction::Location register_table[] = {
|
||||||
Instruction::Location::B, Instruction::Location::C,
|
Instruction::Location::B, Instruction::Location::C,
|
||||||
Instruction::Location::D, Instruction::Location::E,
|
Instruction::Location::D, Instruction::Location::E,
|
||||||
Instruction::Location::H, Instruction::Location::L,
|
Instruction::Location::H, Instruction::Location::L,
|
||||||
|
@@ -8,14 +8,14 @@
|
|||||||
|
|
||||||
#include "StaticAnalyser.hpp"
|
#include "StaticAnalyser.hpp"
|
||||||
|
|
||||||
#include "../AppleII/Target.hpp"
|
#include "Analyser/Static/AppleII/Target.hpp"
|
||||||
#include "../AppleIIgs/Target.hpp"
|
#include "Analyser/Static//AppleIIgs/Target.hpp"
|
||||||
#include "../Oric/Target.hpp"
|
#include "Analyser/Static//Oric/Target.hpp"
|
||||||
#include "../Disassembler/6502.hpp"
|
#include "Analyser/Static//Disassembler/6502.hpp"
|
||||||
#include "../Disassembler/AddressMapper.hpp"
|
#include "Analyser/Static//Disassembler/AddressMapper.hpp"
|
||||||
|
|
||||||
#include "../../../Storage/Disk/Track/TrackSerialiser.hpp"
|
#include "Storage/Disk/Track/TrackSerialiser.hpp"
|
||||||
#include "../../../Storage/Disk/Encodings/AppleGCR/SegmentParser.hpp"
|
#include "Storage/Disk/Encodings/AppleGCR/SegmentParser.hpp"
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
@@ -60,7 +60,7 @@ Analyser::Static::TargetList Analyser::Static::DiskII::GetTargets(
|
|||||||
TargetList targets;
|
TargetList targets;
|
||||||
|
|
||||||
// If the disk image is too large for a 5.25" disk, map this to the IIgs.
|
// If the disk image is too large for a 5.25" disk, map this to the IIgs.
|
||||||
if(disk->get_maximum_head_position() > Storage::Disk::HeadPosition(40)) {
|
if(disk->maximum_head_position() > Storage::Disk::HeadPosition(40)) {
|
||||||
targets.push_back(std::unique_ptr<Analyser::Static::Target>(AppleIIgsTarget()));
|
targets.push_back(std::unique_ptr<Analyser::Static::Target>(AppleIIgsTarget()));
|
||||||
targets.back()->media = media;
|
targets.back()->media = media;
|
||||||
return targets;
|
return targets;
|
||||||
|
@@ -8,8 +8,8 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../StaticAnalyser.hpp"
|
#include "Analyser/Static/StaticAnalyser.hpp"
|
||||||
#include "../../../Storage/TargetPlatforms.hpp"
|
#include "Storage/TargetPlatforms.hpp"
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
namespace Analyser::Static::DiskII {
|
namespace Analyser::Static::DiskII {
|
||||||
|
@@ -9,7 +9,7 @@
|
|||||||
#include "StaticAnalyser.hpp"
|
#include "StaticAnalyser.hpp"
|
||||||
#include "Target.hpp"
|
#include "Target.hpp"
|
||||||
|
|
||||||
#include "../../../Storage/Disk/Parsers/FAT.hpp"
|
#include "Storage/Disk/Parsers/FAT.hpp"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
|
@@ -8,8 +8,8 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../StaticAnalyser.hpp"
|
#include "Analyser/Static/StaticAnalyser.hpp"
|
||||||
#include "../../../Storage/TargetPlatforms.hpp"
|
#include "Storage/TargetPlatforms.hpp"
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
namespace Analyser::Static::Enterprise {
|
namespace Analyser::Static::Enterprise {
|
||||||
|
@@ -8,9 +8,9 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../../../Reflection/Enum.hpp"
|
#include "Analyser/Static/StaticAnalyser.hpp"
|
||||||
#include "../../../Reflection/Struct.hpp"
|
#include "Reflection/Enum.hpp"
|
||||||
#include "../StaticAnalyser.hpp"
|
#include "Reflection/Struct.hpp"
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
@@ -8,12 +8,12 @@
|
|||||||
|
|
||||||
#include "StaticAnalyser.hpp"
|
#include "StaticAnalyser.hpp"
|
||||||
|
|
||||||
#include "../Enterprise/StaticAnalyser.hpp"
|
#include "Analyser/Static/Enterprise/StaticAnalyser.hpp"
|
||||||
#include "../PCCompatible/StaticAnalyser.hpp"
|
#include "Analyser/Static/PCCompatible/StaticAnalyser.hpp"
|
||||||
|
|
||||||
#include "../../../Storage/Disk/Track/TrackSerialiser.hpp"
|
#include "Storage/Disk/Track/TrackSerialiser.hpp"
|
||||||
#include "../../../Storage/Disk/Encodings/MFM/Constants.hpp"
|
#include "Storage/Disk/Encodings/MFM/Constants.hpp"
|
||||||
#include "../../../Storage/Disk/Encodings/MFM/SegmentParser.hpp"
|
#include "Storage/Disk/Encodings/MFM/SegmentParser.hpp"
|
||||||
|
|
||||||
|
|
||||||
Analyser::Static::TargetList Analyser::Static::FAT12::GetTargets(
|
Analyser::Static::TargetList Analyser::Static::FAT12::GetTargets(
|
||||||
@@ -39,7 +39,7 @@ Analyser::Static::TargetList Analyser::Static::FAT12::GetTargets(
|
|||||||
|
|
||||||
// If the disk image is very small or large, map it to the PC. That's the only option old enough
|
// If the disk image is very small or large, map it to the PC. That's the only option old enough
|
||||||
// to have used 5.25" media.
|
// to have used 5.25" media.
|
||||||
if(disk->get_maximum_head_position() <= Storage::Disk::HeadPosition(40)) {
|
if(disk->maximum_head_position() <= Storage::Disk::HeadPosition(40)) {
|
||||||
return Analyser::Static::PCCompatible::GetTargets(media, file_name, platforms, true);
|
return Analyser::Static::PCCompatible::GetTargets(media, file_name, platforms, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -8,8 +8,8 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../StaticAnalyser.hpp"
|
#include "Analyser/Static/StaticAnalyser.hpp"
|
||||||
#include "../../../Storage/TargetPlatforms.hpp"
|
#include "Storage/TargetPlatforms.hpp"
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
namespace Analyser::Static::FAT12 {
|
namespace Analyser::Static::FAT12 {
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../../../Storage/Cartridge/Cartridge.hpp"
|
#include "Storage/Cartridge/Cartridge.hpp"
|
||||||
|
|
||||||
namespace Analyser::Static::MSX {
|
namespace Analyser::Static::MSX {
|
||||||
|
|
||||||
|
@@ -12,8 +12,8 @@
|
|||||||
#include "Tape.hpp"
|
#include "Tape.hpp"
|
||||||
#include "Target.hpp"
|
#include "Target.hpp"
|
||||||
|
|
||||||
#include "../Disassembler/Z80.hpp"
|
#include "Analyser/Static/Disassembler/Z80.hpp"
|
||||||
#include "../Disassembler/AddressMapper.hpp"
|
#include "Analyser/Static//Disassembler/AddressMapper.hpp"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
|
@@ -8,8 +8,8 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../StaticAnalyser.hpp"
|
#include "Analyser/Static/StaticAnalyser.hpp"
|
||||||
#include "../../../Storage/TargetPlatforms.hpp"
|
#include "Storage/TargetPlatforms.hpp"
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
namespace Analyser::Static::MSX {
|
namespace Analyser::Static::MSX {
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
#include "Tape.hpp"
|
#include "Tape.hpp"
|
||||||
|
|
||||||
#include "../../../Storage/Tape/Parsers/MSX.hpp"
|
#include "Storage/Tape/Parsers/MSX.hpp"
|
||||||
|
|
||||||
using namespace Analyser::Static::MSX;
|
using namespace Analyser::Static::MSX;
|
||||||
|
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../../../Storage/Tape/Tape.hpp"
|
#include "Storage/Tape/Tape.hpp"
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
@@ -8,9 +8,9 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../../../Reflection/Enum.hpp"
|
#include "Analyser/Static/StaticAnalyser.hpp"
|
||||||
#include "../../../Reflection/Struct.hpp"
|
#include "Reflection/Enum.hpp"
|
||||||
#include "../StaticAnalyser.hpp"
|
#include "Reflection/Struct.hpp"
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
namespace Analyser::Static::MSX {
|
namespace Analyser::Static::MSX {
|
||||||
|
@@ -29,7 +29,7 @@ Analyser::Static::TargetList Analyser::Static::Macintosh::GetTargets(
|
|||||||
if(media.mass_storage_devices.empty()) {
|
if(media.mass_storage_devices.empty()) {
|
||||||
bool has_800kb_disks = false;
|
bool has_800kb_disks = false;
|
||||||
for(const auto &disk: media.disks) {
|
for(const auto &disk: media.disks) {
|
||||||
has_800kb_disks |= disk->get_head_count() > 1;
|
has_800kb_disks |= disk->head_count() > 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!has_800kb_disks) {
|
if(!has_800kb_disks) {
|
||||||
|
@@ -8,8 +8,8 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../StaticAnalyser.hpp"
|
#include "Analyser/Static/StaticAnalyser.hpp"
|
||||||
#include "../../../Storage/TargetPlatforms.hpp"
|
#include "Storage/TargetPlatforms.hpp"
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
namespace Analyser::Static::Macintosh {
|
namespace Analyser::Static::Macintosh {
|
||||||
|
@@ -8,9 +8,9 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../../../Reflection/Enum.hpp"
|
#include "Analyser/Static/StaticAnalyser.hpp"
|
||||||
#include "../../../Reflection/Struct.hpp"
|
#include "Reflection/Enum.hpp"
|
||||||
#include "../StaticAnalyser.hpp"
|
#include "Reflection/Struct.hpp"
|
||||||
|
|
||||||
namespace Analyser::Static::Macintosh {
|
namespace Analyser::Static::Macintosh {
|
||||||
|
|
||||||
|
@@ -11,10 +11,10 @@
|
|||||||
#include "Tape.hpp"
|
#include "Tape.hpp"
|
||||||
#include "Target.hpp"
|
#include "Target.hpp"
|
||||||
|
|
||||||
#include "../Disassembler/6502.hpp"
|
#include "Analyser/Static/Disassembler/6502.hpp"
|
||||||
#include "../Disassembler/AddressMapper.hpp"
|
#include "Analyser/Static/Disassembler/AddressMapper.hpp"
|
||||||
|
|
||||||
#include "../../../Storage/Disk/Encodings/MFM/Parser.hpp"
|
#include "Storage/Disk/Encodings/MFM/Parser.hpp"
|
||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
|
@@ -8,8 +8,8 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../StaticAnalyser.hpp"
|
#include "Analyser/Static/StaticAnalyser.hpp"
|
||||||
#include "../../../Storage/TargetPlatforms.hpp"
|
#include "Storage/TargetPlatforms.hpp"
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
namespace Analyser::Static::Oric {
|
namespace Analyser::Static::Oric {
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#include "Tape.hpp"
|
#include "Tape.hpp"
|
||||||
#include "../../../Storage/Tape/Parsers/Oric.hpp"
|
#include "Storage/Tape/Parsers/Oric.hpp"
|
||||||
|
|
||||||
using namespace Analyser::Static::Oric;
|
using namespace Analyser::Static::Oric;
|
||||||
|
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../../../Storage/Tape/Tape.hpp"
|
#include "Storage/Tape/Tape.hpp"
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
@@ -8,9 +8,9 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../../../Reflection/Enum.hpp"
|
#include "Analyser/Static/StaticAnalyser.hpp"
|
||||||
#include "../../../Reflection/Struct.hpp"
|
#include "Reflection/Enum.hpp"
|
||||||
#include "../StaticAnalyser.hpp"
|
#include "Reflection/Struct.hpp"
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
namespace Analyser::Static::Oric {
|
namespace Analyser::Static::Oric {
|
||||||
|
@@ -8,8 +8,8 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../StaticAnalyser.hpp"
|
#include "Analyser/Static/StaticAnalyser.hpp"
|
||||||
#include "../../../Storage/TargetPlatforms.hpp"
|
#include "Storage/TargetPlatforms.hpp"
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
namespace Analyser::Static::PCCompatible {
|
namespace Analyser::Static::PCCompatible {
|
||||||
|
@@ -8,21 +8,36 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../../../Reflection/Struct.hpp"
|
#include "Analyser/Static/StaticAnalyser.hpp"
|
||||||
#include "../StaticAnalyser.hpp"
|
#include "Reflection/Struct.hpp"
|
||||||
|
|
||||||
namespace Analyser::Static::PCCompatible {
|
namespace Analyser::Static::PCCompatible {
|
||||||
|
|
||||||
|
ReflectableEnum(Model,
|
||||||
|
XT,
|
||||||
|
TurboXT,
|
||||||
|
AT
|
||||||
|
);
|
||||||
|
|
||||||
|
constexpr bool is_xt(const Model model) {
|
||||||
|
return model <= Model::TurboXT;
|
||||||
|
}
|
||||||
|
|
||||||
|
constexpr bool is_at(const Model model) {
|
||||||
|
return model >= Model::AT;
|
||||||
|
}
|
||||||
|
|
||||||
|
constexpr bool has_ide(const Model model) {
|
||||||
|
return model >= Model::AT;
|
||||||
|
}
|
||||||
|
|
||||||
struct Target: public Analyser::Static::Target, public Reflection::StructImpl<Target> {
|
struct Target: public Analyser::Static::Target, public Reflection::StructImpl<Target> {
|
||||||
ReflectableEnum(VideoAdaptor,
|
ReflectableEnum(VideoAdaptor,
|
||||||
MDA,
|
MDA,
|
||||||
CGA);
|
CGA,
|
||||||
|
);
|
||||||
VideoAdaptor adaptor = VideoAdaptor::CGA;
|
VideoAdaptor adaptor = VideoAdaptor::CGA;
|
||||||
|
Model model = Model::TurboXT;
|
||||||
ReflectableEnum(Speed,
|
|
||||||
ApproximatelyOriginal,
|
|
||||||
Fast);
|
|
||||||
Speed speed = Speed::Fast;
|
|
||||||
|
|
||||||
Target() : Analyser::Static::Target(Machine::PCCompatible) {}
|
Target() : Analyser::Static::Target(Machine::PCCompatible) {}
|
||||||
|
|
||||||
@@ -30,9 +45,9 @@ private:
|
|||||||
friend Reflection::StructImpl<Target>;
|
friend Reflection::StructImpl<Target>;
|
||||||
void declare_fields() {
|
void declare_fields() {
|
||||||
AnnounceEnum(VideoAdaptor);
|
AnnounceEnum(VideoAdaptor);
|
||||||
AnnounceEnum(Speed);
|
AnnounceEnum(Model);
|
||||||
DeclareField(adaptor);
|
DeclareField(adaptor);
|
||||||
DeclareField(speed);
|
DeclareField(model);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -8,8 +8,8 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../StaticAnalyser.hpp"
|
#include "Analyser/Static/StaticAnalyser.hpp"
|
||||||
#include "../../../Storage/TargetPlatforms.hpp"
|
#include "Storage/TargetPlatforms.hpp"
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
namespace Analyser::Static::Sega {
|
namespace Analyser::Static::Sega {
|
||||||
|
@@ -8,9 +8,9 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../../../Reflection/Enum.hpp"
|
#include "Analyser/Static/StaticAnalyser.hpp"
|
||||||
#include "../../../Reflection/Struct.hpp"
|
#include "Reflection/Enum.hpp"
|
||||||
#include "../StaticAnalyser.hpp"
|
#include "Reflection/Struct.hpp"
|
||||||
|
|
||||||
namespace Analyser::Static::Sega {
|
namespace Analyser::Static::Sega {
|
||||||
|
|
||||||
|
@@ -9,82 +9,85 @@
|
|||||||
#include "StaticAnalyser.hpp"
|
#include "StaticAnalyser.hpp"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <bit>
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
|
|
||||||
// Analysers
|
// Analysers
|
||||||
#include "Acorn/StaticAnalyser.hpp"
|
#include "Analyser/Static/Acorn/StaticAnalyser.hpp"
|
||||||
#include "Amiga/StaticAnalyser.hpp"
|
#include "Analyser/Static/Amiga/StaticAnalyser.hpp"
|
||||||
#include "AmstradCPC/StaticAnalyser.hpp"
|
#include "Analyser/Static/AmstradCPC/StaticAnalyser.hpp"
|
||||||
#include "AppleII/StaticAnalyser.hpp"
|
#include "Analyser/Static/AppleII/StaticAnalyser.hpp"
|
||||||
#include "AppleIIgs/StaticAnalyser.hpp"
|
#include "Analyser/Static/AppleIIgs/StaticAnalyser.hpp"
|
||||||
#include "Atari2600/StaticAnalyser.hpp"
|
#include "Analyser/Static/Atari2600/StaticAnalyser.hpp"
|
||||||
#include "AtariST/StaticAnalyser.hpp"
|
#include "Analyser/Static/AtariST/StaticAnalyser.hpp"
|
||||||
#include "Coleco/StaticAnalyser.hpp"
|
#include "Analyser/Static/Coleco/StaticAnalyser.hpp"
|
||||||
#include "Commodore/StaticAnalyser.hpp"
|
#include "Analyser/Static/Commodore/StaticAnalyser.hpp"
|
||||||
#include "DiskII/StaticAnalyser.hpp"
|
#include "Analyser/Static/DiskII/StaticAnalyser.hpp"
|
||||||
#include "Enterprise/StaticAnalyser.hpp"
|
#include "Analyser/Static/Enterprise/StaticAnalyser.hpp"
|
||||||
#include "FAT12/StaticAnalyser.hpp"
|
#include "Analyser/Static/FAT12/StaticAnalyser.hpp"
|
||||||
#include "Macintosh/StaticAnalyser.hpp"
|
#include "Analyser/Static/Macintosh/StaticAnalyser.hpp"
|
||||||
#include "MSX/StaticAnalyser.hpp"
|
#include "Analyser/Static/MSX/StaticAnalyser.hpp"
|
||||||
#include "Oric/StaticAnalyser.hpp"
|
#include "Analyser/Static/Oric/StaticAnalyser.hpp"
|
||||||
#include "PCCompatible/StaticAnalyser.hpp"
|
#include "Analyser/Static/PCCompatible/StaticAnalyser.hpp"
|
||||||
#include "Sega/StaticAnalyser.hpp"
|
#include "Analyser/Static/Sega/StaticAnalyser.hpp"
|
||||||
#include "ZX8081/StaticAnalyser.hpp"
|
#include "Analyser/Static/ZX8081/StaticAnalyser.hpp"
|
||||||
#include "ZXSpectrum/StaticAnalyser.hpp"
|
#include "Analyser/Static/ZXSpectrum/StaticAnalyser.hpp"
|
||||||
|
|
||||||
// Cartridges
|
// Cartridges
|
||||||
#include "../../Storage/Cartridge/Formats/BinaryDump.hpp"
|
#include "Storage/Cartridge/Formats/BinaryDump.hpp"
|
||||||
#include "../../Storage/Cartridge/Formats/PRG.hpp"
|
#include "Storage/Cartridge/Formats/PRG.hpp"
|
||||||
|
|
||||||
// Disks
|
// Disks
|
||||||
#include "../../Storage/Disk/DiskImage/Formats/2MG.hpp"
|
#include "Storage/Disk/DiskImage/Formats/2MG.hpp"
|
||||||
#include "../../Storage/Disk/DiskImage/Formats/AcornADF.hpp"
|
#include "Storage/Disk/DiskImage/Formats/AcornADF.hpp"
|
||||||
#include "../../Storage/Disk/DiskImage/Formats/AmigaADF.hpp"
|
#include "Storage/Disk/DiskImage/Formats/AmigaADF.hpp"
|
||||||
#include "../../Storage/Disk/DiskImage/Formats/AppleDSK.hpp"
|
#include "Storage/Disk/DiskImage/Formats/AppleDSK.hpp"
|
||||||
#include "../../Storage/Disk/DiskImage/Formats/CPCDSK.hpp"
|
#include "Storage/Disk/DiskImage/Formats/CPCDSK.hpp"
|
||||||
#include "../../Storage/Disk/DiskImage/Formats/D64.hpp"
|
#include "Storage/Disk/DiskImage/Formats/D64.hpp"
|
||||||
#include "../../Storage/Disk/DiskImage/Formats/G64.hpp"
|
#include "Storage/Disk/DiskImage/Formats/G64.hpp"
|
||||||
#include "../../Storage/Disk/DiskImage/Formats/DMK.hpp"
|
#include "Storage/Disk/DiskImage/Formats/DMK.hpp"
|
||||||
#include "../../Storage/Disk/DiskImage/Formats/FAT12.hpp"
|
#include "Storage/Disk/DiskImage/Formats/FAT12.hpp"
|
||||||
#include "../../Storage/Disk/DiskImage/Formats/HFE.hpp"
|
#include "Storage/Disk/DiskImage/Formats/HFE.hpp"
|
||||||
#include "../../Storage/Disk/DiskImage/Formats/IPF.hpp"
|
#include "Storage/Disk/DiskImage/Formats/IPF.hpp"
|
||||||
#include "../../Storage/Disk/DiskImage/Formats/IMD.hpp"
|
#include "Storage/Disk/DiskImage/Formats/IMD.hpp"
|
||||||
#include "../../Storage/Disk/DiskImage/Formats/MacintoshIMG.hpp"
|
#include "Storage/Disk/DiskImage/Formats/JFD.hpp"
|
||||||
#include "../../Storage/Disk/DiskImage/Formats/MSA.hpp"
|
#include "Storage/Disk/DiskImage/Formats/MacintoshIMG.hpp"
|
||||||
#include "../../Storage/Disk/DiskImage/Formats/NIB.hpp"
|
#include "Storage/Disk/DiskImage/Formats/MSA.hpp"
|
||||||
#include "../../Storage/Disk/DiskImage/Formats/OricMFMDSK.hpp"
|
#include "Storage/Disk/DiskImage/Formats/NIB.hpp"
|
||||||
#include "../../Storage/Disk/DiskImage/Formats/PCBooter.hpp"
|
#include "Storage/Disk/DiskImage/Formats/OricMFMDSK.hpp"
|
||||||
#include "../../Storage/Disk/DiskImage/Formats/SSD.hpp"
|
#include "Storage/Disk/DiskImage/Formats/PCBooter.hpp"
|
||||||
#include "../../Storage/Disk/DiskImage/Formats/STX.hpp"
|
#include "Storage/Disk/DiskImage/Formats/SSD.hpp"
|
||||||
#include "../../Storage/Disk/DiskImage/Formats/WOZ.hpp"
|
#include "Storage/Disk/DiskImage/Formats/STX.hpp"
|
||||||
|
#include "Storage/Disk/DiskImage/Formats/WOZ.hpp"
|
||||||
|
|
||||||
// Mass Storage Devices (i.e. usually, hard disks)
|
// Mass Storage Devices (i.e. usually, hard disks)
|
||||||
#include "../../Storage/MassStorage/Formats/DAT.hpp"
|
#include "Storage/MassStorage/Formats/DAT.hpp"
|
||||||
#include "../../Storage/MassStorage/Formats/DSK.hpp"
|
#include "Storage/MassStorage/Formats/DSK.hpp"
|
||||||
#include "../../Storage/MassStorage/Formats/HDV.hpp"
|
#include "Storage/MassStorage/Formats/HDV.hpp"
|
||||||
#include "../../Storage/MassStorage/Formats/HFV.hpp"
|
#include "Storage/MassStorage/Formats/HFV.hpp"
|
||||||
|
#include "Storage/MassStorage/Formats/VHD.hpp"
|
||||||
|
|
||||||
// State Snapshots
|
// State Snapshots
|
||||||
#include "../../Storage/State/SNA.hpp"
|
#include "Storage/State/SNA.hpp"
|
||||||
#include "../../Storage/State/SZX.hpp"
|
#include "Storage/State/SZX.hpp"
|
||||||
#include "../../Storage/State/Z80.hpp"
|
#include "Storage/State/Z80.hpp"
|
||||||
|
|
||||||
// Tapes
|
// Tapes
|
||||||
#include "../../Storage/Tape/Formats/CAS.hpp"
|
#include "Storage/Tape/Formats/CAS.hpp"
|
||||||
#include "../../Storage/Tape/Formats/CommodoreTAP.hpp"
|
#include "Storage/Tape/Formats/CommodoreTAP.hpp"
|
||||||
#include "../../Storage/Tape/Formats/CSW.hpp"
|
#include "Storage/Tape/Formats/CSW.hpp"
|
||||||
#include "../../Storage/Tape/Formats/OricTAP.hpp"
|
#include "Storage/Tape/Formats/OricTAP.hpp"
|
||||||
#include "../../Storage/Tape/Formats/TapePRG.hpp"
|
#include "Storage/Tape/Formats/TapePRG.hpp"
|
||||||
#include "../../Storage/Tape/Formats/TapeUEF.hpp"
|
#include "Storage/Tape/Formats/TapeUEF.hpp"
|
||||||
#include "../../Storage/Tape/Formats/TZX.hpp"
|
#include "Storage/Tape/Formats/TZX.hpp"
|
||||||
#include "../../Storage/Tape/Formats/ZX80O81P.hpp"
|
#include "Storage/Tape/Formats/ZX80O81P.hpp"
|
||||||
#include "../../Storage/Tape/Formats/ZXSpectrumTAP.hpp"
|
#include "Storage/Tape/Formats/ZXSpectrumTAP.hpp"
|
||||||
|
|
||||||
// Target Platform Types
|
// Target Platform Types
|
||||||
#include "../../Storage/TargetPlatforms.hpp"
|
#include "Storage/TargetPlatforms.hpp"
|
||||||
|
|
||||||
template<class> inline constexpr bool always_false_v = false;
|
template<class> inline constexpr bool always_false_v = false;
|
||||||
|
|
||||||
@@ -205,6 +208,7 @@ static Media GetMediaAndPlatforms(const std::string &file_name, TargetPlatform::
|
|||||||
accumulator.try_standard<Disk::DiskImageHolder<Disk::AcornADF>>(TargetPlatform::Acorn, "adf");
|
accumulator.try_standard<Disk::DiskImageHolder<Disk::AcornADF>>(TargetPlatform::Acorn, "adf");
|
||||||
accumulator.try_standard<Disk::DiskImageHolder<Disk::AmigaADF>>(TargetPlatform::Amiga, "adf");
|
accumulator.try_standard<Disk::DiskImageHolder<Disk::AmigaADF>>(TargetPlatform::Amiga, "adf");
|
||||||
accumulator.try_standard<Disk::DiskImageHolder<Disk::AcornADF>>(TargetPlatform::Acorn, "adl");
|
accumulator.try_standard<Disk::DiskImageHolder<Disk::AcornADF>>(TargetPlatform::Acorn, "adl");
|
||||||
|
accumulator.try_standard<Disk::DiskImageHolder<Disk::JFD>>(TargetPlatform::Archimedes, "jfd");
|
||||||
|
|
||||||
accumulator.try_standard<Cartridge::BinaryDump>(TargetPlatform::AllCartridge, "bin");
|
accumulator.try_standard<Cartridge::BinaryDump>(TargetPlatform::AllCartridge, "bin");
|
||||||
|
|
||||||
@@ -269,13 +273,14 @@ static Media GetMediaAndPlatforms(const std::string &file_name, TargetPlatform::
|
|||||||
|
|
||||||
accumulator.try_standard<Tape::ZX80O81P>(TargetPlatform::ZX8081, "p81");
|
accumulator.try_standard<Tape::ZX80O81P>(TargetPlatform::ZX8081, "p81");
|
||||||
|
|
||||||
|
static constexpr auto PRGTargets = TargetPlatform::Vic20; //Commodore8bit; // Disabled until analysis improves.
|
||||||
if(accumulator.name_matches("prg")) {
|
if(accumulator.name_matches("prg")) {
|
||||||
// Try instantiating as a ROM; failing that accept as a tape.
|
// Try instantiating as a ROM; failing that accept as a tape.
|
||||||
try {
|
try {
|
||||||
accumulator.insert<Cartridge::PRG>(TargetPlatform::Commodore8bit, file_name);
|
accumulator.insert<Cartridge::PRG>(PRGTargets, file_name);
|
||||||
} catch(...) {
|
} catch(...) {
|
||||||
try {
|
try {
|
||||||
accumulator.insert<Tape::PRG>(TargetPlatform::Commodore8bit, file_name);
|
accumulator.insert<Tape::PRG>(PRGTargets, file_name);
|
||||||
} catch(...) {}
|
} catch(...) {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -298,6 +303,8 @@ static Media GetMediaAndPlatforms(const std::string &file_name, TargetPlatform::
|
|||||||
|
|
||||||
accumulator.try_standard<Tape::UEF>(TargetPlatform::Acorn, "uef");
|
accumulator.try_standard<Tape::UEF>(TargetPlatform::Acorn, "uef");
|
||||||
|
|
||||||
|
accumulator.try_standard<MassStorage::VHD>(TargetPlatform::PCCompatible, "vhd");
|
||||||
|
|
||||||
accumulator.try_standard<Disk::DiskImageHolder<Disk::WOZ>>(TargetPlatform::DiskII, "woz");
|
accumulator.try_standard<Disk::DiskImageHolder<Disk::WOZ>>(TargetPlatform::DiskII, "woz");
|
||||||
|
|
||||||
return accumulator.media;
|
return accumulator.media;
|
||||||
@@ -339,13 +346,7 @@ TargetList Analyser::Static::GetTargets(const std::string &file_name) {
|
|||||||
TargetPlatform::IntType potential_platforms = 0;
|
TargetPlatform::IntType potential_platforms = 0;
|
||||||
Media media = GetMediaAndPlatforms(file_name, potential_platforms);
|
Media media = GetMediaAndPlatforms(file_name, potential_platforms);
|
||||||
|
|
||||||
// TODO: std::popcount here.
|
int total_options = std::popcount(potential_platforms);
|
||||||
int total_options = 0;
|
|
||||||
TargetPlatform::IntType mask = 1;
|
|
||||||
while(mask) {
|
|
||||||
total_options += bool(potential_platforms & mask);
|
|
||||||
mask <<= 1;
|
|
||||||
}
|
|
||||||
const bool is_confident = total_options == 1;
|
const bool is_confident = total_options == 1;
|
||||||
// i.e. This analyser `is_confident` if file analysis suggested only one potential target platform.
|
// i.e. This analyser `is_confident` if file analysis suggested only one potential target platform.
|
||||||
// The machine-specific static analyser will still run in case it can provide meaningful annotations on
|
// The machine-specific static analyser will still run in case it can provide meaningful annotations on
|
||||||
|
@@ -8,14 +8,14 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../Machines.hpp"
|
#include "Analyser/Machines.hpp"
|
||||||
|
|
||||||
#include "../../Storage/Cartridge/Cartridge.hpp"
|
#include "Storage/Cartridge/Cartridge.hpp"
|
||||||
#include "../../Storage/Disk/Disk.hpp"
|
#include "Storage/Disk/Disk.hpp"
|
||||||
#include "../../Storage/MassStorage/MassStorageDevice.hpp"
|
#include "Storage/MassStorage/MassStorageDevice.hpp"
|
||||||
#include "../../Storage/Tape/Tape.hpp"
|
#include "Storage/Tape/Tape.hpp"
|
||||||
#include "../../Storage/TargetPlatforms.hpp"
|
#include "Storage/TargetPlatforms.hpp"
|
||||||
#include "../../Reflection/Struct.hpp"
|
#include "Reflection/Struct.hpp"
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "Target.hpp"
|
#include "Target.hpp"
|
||||||
#include "../../../Storage/Tape/Parsers/ZX8081.hpp"
|
#include "Storage/Tape/Parsers/ZX8081.hpp"
|
||||||
|
|
||||||
static std::vector<Storage::Data::ZX8081::File> GetFiles(Storage::Tape::TapeSerialiser &serialiser) {
|
static std::vector<Storage::Data::ZX8081::File> GetFiles(Storage::Tape::TapeSerialiser &serialiser) {
|
||||||
std::vector<Storage::Data::ZX8081::File> files;
|
std::vector<Storage::Data::ZX8081::File> files;
|
||||||
|
@@ -8,8 +8,8 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../StaticAnalyser.hpp"
|
#include "Analyser/Static/StaticAnalyser.hpp"
|
||||||
#include "../../../Storage/TargetPlatforms.hpp"
|
#include "Storage/TargetPlatforms.hpp"
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
namespace Analyser::Static::ZX8081 {
|
namespace Analyser::Static::ZX8081 {
|
||||||
|
@@ -8,9 +8,9 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../../../Reflection/Enum.hpp"
|
#include "Analyser/Static/StaticAnalyser.hpp"
|
||||||
#include "../../../Reflection/Struct.hpp"
|
#include "Reflection/Enum.hpp"
|
||||||
#include "../StaticAnalyser.hpp"
|
#include "Reflection/Struct.hpp"
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
namespace Analyser::Static::ZX8081 {
|
namespace Analyser::Static::ZX8081 {
|
||||||
|
@@ -8,9 +8,9 @@
|
|||||||
|
|
||||||
#include "StaticAnalyser.hpp"
|
#include "StaticAnalyser.hpp"
|
||||||
|
|
||||||
#include "../../../Storage/Disk/Parsers/CPM.hpp"
|
#include "Storage/Disk/Parsers/CPM.hpp"
|
||||||
#include "../../../Storage/Disk/Encodings/MFM/Parser.hpp"
|
#include "Storage/Disk/Encodings/MFM/Parser.hpp"
|
||||||
#include "../../../Storage/Tape/Parsers/Spectrum.hpp"
|
#include "Storage/Tape/Parsers/Spectrum.hpp"
|
||||||
|
|
||||||
#include "Target.hpp"
|
#include "Target.hpp"
|
||||||
|
|
||||||
|
@@ -8,8 +8,8 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../StaticAnalyser.hpp"
|
#include "Analyser/Static/StaticAnalyser.hpp"
|
||||||
#include "../../../Storage/TargetPlatforms.hpp"
|
#include "Storage/TargetPlatforms.hpp"
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
namespace Analyser::Static::ZXSpectrum {
|
namespace Analyser::Static::ZXSpectrum {
|
||||||
|
@@ -8,9 +8,9 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../../../Reflection/Enum.hpp"
|
#include "Analyser/Static/StaticAnalyser.hpp"
|
||||||
#include "../../../Reflection/Struct.hpp"
|
#include "Reflection/Enum.hpp"
|
||||||
#include "../StaticAnalyser.hpp"
|
#include "Reflection/Struct.hpp"
|
||||||
|
|
||||||
namespace Analyser::Static::ZXSpectrum {
|
namespace Analyser::Static::ZXSpectrum {
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@ project(CLK
|
|||||||
VERSION 24.01.22
|
VERSION 24.01.22
|
||||||
)
|
)
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 17)
|
set(CMAKE_CXX_STANDARD 20)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||||
|
|
||||||
@@ -29,6 +29,7 @@ endif()
|
|||||||
message(STATUS "Configuring for ${CLK_UI} UI")
|
message(STATUS "Configuring for ${CLK_UI} UI")
|
||||||
|
|
||||||
list(PREPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
list(PREPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
||||||
|
include_directories(".")
|
||||||
include("CLK_SOURCES")
|
include("CLK_SOURCES")
|
||||||
|
|
||||||
add_executable(clksignal ${CLK_SOURCES})
|
add_executable(clksignal ${CLK_SOURCES})
|
||||||
|
@@ -128,12 +128,7 @@ public:
|
|||||||
|
|
||||||
forceinline constexpr T operator -() const { return T(- length_); }
|
forceinline constexpr T operator -() const { return T(- length_); }
|
||||||
|
|
||||||
forceinline constexpr bool operator <(const T &rhs) const { return length_ < rhs.length_; }
|
auto operator <=>(const WrappedInt &) const = default;
|
||||||
forceinline constexpr bool operator >(const T &rhs) const { return length_ > rhs.length_; }
|
|
||||||
forceinline constexpr bool operator <=(const T &rhs) const { return length_ <= rhs.length_; }
|
|
||||||
forceinline constexpr bool operator >=(const T &rhs) const { return length_ >= rhs.length_; }
|
|
||||||
forceinline constexpr bool operator ==(const T &rhs) const { return length_ == rhs.length_; }
|
|
||||||
forceinline constexpr bool operator !=(const T &rhs) const { return length_ != rhs.length_; }
|
|
||||||
|
|
||||||
forceinline constexpr bool operator !() const { return !length_; }
|
forceinline constexpr bool operator !() const { return !length_; }
|
||||||
// bool operator () is not supported because it offers an implicit cast to int,
|
// bool operator () is not supported because it offers an implicit cast to int,
|
||||||
|
@@ -16,10 +16,10 @@ template <int DeferredDepth, typename ValueT> class DeferredValue {
|
|||||||
private:
|
private:
|
||||||
static_assert(sizeof(ValueT) <= 4);
|
static_assert(sizeof(ValueT) <= 4);
|
||||||
|
|
||||||
constexpr int elements_per_uint32 = sizeof(uint32_t) / sizeof(ValueT);
|
static constexpr int elements_per_uint32 = sizeof(uint32_t) / sizeof(ValueT);
|
||||||
constexpr int unit_shift = sizeof(ValueT) * 8;
|
static constexpr int unit_shift = sizeof(ValueT) * 8;
|
||||||
constexpr int insert_shift = (DeferredDepth & (elements_per_uint32 - 1)) * unit_shift;
|
static constexpr int insert_shift = (DeferredDepth & (elements_per_uint32 - 1)) * unit_shift;
|
||||||
constexpr uint32_t insert_mask = ~(0xffff'ffff << insert_shift);
|
static constexpr uint32_t insert_mask = ~(0xffff'ffff << insert_shift);
|
||||||
|
|
||||||
std::array<uint32_t, (DeferredDepth + elements_per_uint32 - 1) / elements_per_uint32> backlog;
|
std::array<uint32_t, (DeferredDepth + elements_per_uint32 - 1) / elements_per_uint32> backlog;
|
||||||
|
|
||||||
|
@@ -9,7 +9,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "ClockReceiver.hpp"
|
#include "ClockReceiver.hpp"
|
||||||
#include "../Concurrency/AsyncTaskQueue.hpp"
|
#include "Concurrency/AsyncTaskQueue.hpp"
|
||||||
#include "ClockingHintSource.hpp"
|
#include "ClockingHintSource.hpp"
|
||||||
#include "ForceInline.hpp"
|
#include "ForceInline.hpp"
|
||||||
|
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../Outputs/ScanTarget.hpp"
|
#include "Outputs/ScanTarget.hpp"
|
||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
|
@@ -8,8 +8,8 @@
|
|||||||
|
|
||||||
#include "1770.hpp"
|
#include "1770.hpp"
|
||||||
|
|
||||||
#include "../../Storage/Disk/Encodings/MFM/Constants.hpp"
|
#include "Storage/Disk/Encodings/MFM/Constants.hpp"
|
||||||
#include "../../Outputs/Log.hpp"
|
#include "Outputs/Log.hpp"
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
Log::Logger<Log::Source::WDFDC> logger;
|
Log::Logger<Log::Source::WDFDC> logger;
|
||||||
@@ -77,7 +77,7 @@ uint8_t WD1770::read(const int address) {
|
|||||||
status |=
|
status |=
|
||||||
(status_.track_zero ? Flag::TrackZero : 0) |
|
(status_.track_zero ? Flag::TrackZero : 0) |
|
||||||
(status_.seek_error ? Flag::SeekError : 0) |
|
(status_.seek_error ? Flag::SeekError : 0) |
|
||||||
(get_drive().get_is_read_only() ? Flag::WriteProtect : 0) |
|
(get_drive().is_read_only() ? Flag::WriteProtect : 0) |
|
||||||
(get_drive().get_index_pulse() ? Flag::Index : 0);
|
(get_drive().get_index_pulse() ? Flag::Index : 0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -132,26 +132,29 @@ void WD1770::run_for(const Cycles cycles) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void WD1770::posit_event(const int new_event_type) {
|
||||||
#define WAIT_FOR_EVENT(mask) resume_point_ = __LINE__; interesting_event_mask_ = int(mask); return; case __LINE__:
|
#define WAIT_FOR_EVENT(mask) resume_point_ = __LINE__; interesting_event_mask_ = int(mask); return; case __LINE__:
|
||||||
#define WAIT_FOR_TIME(ms) resume_point_ = __LINE__; delay_time_ = ms * 8000; WAIT_FOR_EVENT(Event1770::Timer);
|
#define WAIT_FOR_TIME(ms) resume_point_ = __LINE__; delay_time_ = ms * 8000; WAIT_FOR_EVENT(Event1770::Timer);
|
||||||
#define WAIT_FOR_BYTES(count) resume_point_ = __LINE__; distance_into_section_ = 0; WAIT_FOR_EVENT(Event::Token); if(get_latest_token().type == Token::Byte) distance_into_section_++; if(distance_into_section_ < count) { interesting_event_mask_ = int(Event::Token); return; }
|
#define WAIT_FOR_BYTES(count) distance_into_section_ = 0; \
|
||||||
|
WAIT_FOR_EVENT(Event::Token); \
|
||||||
|
if(get_latest_token().type == Token::Byte) ++distance_into_section_; \
|
||||||
|
if(distance_into_section_ < count) { \
|
||||||
|
return; \
|
||||||
|
}
|
||||||
#define BEGIN_SECTION() switch(resume_point_) { default:
|
#define BEGIN_SECTION() switch(resume_point_) { default:
|
||||||
#define END_SECTION() (void)0; }
|
#define END_SECTION() (void)0; }
|
||||||
|
|
||||||
#define READ_ID() \
|
const auto READ_ID = [&] {
|
||||||
if(new_event_type == int(Event::Token)) { \
|
if(new_event_type == int(Event::Token)) {
|
||||||
if(!distance_into_section_ && get_latest_token().type == Token::ID) {\
|
if(!distance_into_section_ && get_latest_token().type == Token::ID) {
|
||||||
set_data_mode(DataMode::Reading); \
|
set_data_mode(DataMode::Reading);
|
||||||
++distance_into_section_; \
|
++distance_into_section_;
|
||||||
} else if(distance_into_section_ && distance_into_section_ < 7 && get_latest_token().type == Token::Byte) { \
|
} else if(distance_into_section_ && distance_into_section_ < 7 && get_latest_token().type == Token::Byte) {
|
||||||
header_[distance_into_section_ - 1] = get_latest_token().byte_value; \
|
header_[distance_into_section_ - 1] = get_latest_token().byte_value;
|
||||||
++distance_into_section_; \
|
++distance_into_section_;
|
||||||
} \
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
#define CONCATENATE(x, y) x ## y
|
|
||||||
#define INDIRECT_CONCATENATE(x, y) TOKENPASTE(x, y)
|
|
||||||
#define LINE_LABEL INDIRECT_CONCATENATE(label, __LINE__)
|
|
||||||
|
|
||||||
#define SPIN_UP() \
|
#define SPIN_UP() \
|
||||||
set_motor_on(true); \
|
set_motor_on(true); \
|
||||||
@@ -160,24 +163,6 @@ void WD1770::run_for(const Cycles cycles) {
|
|||||||
WAIT_FOR_EVENT(Event1770::IndexHoleTarget); \
|
WAIT_FOR_EVENT(Event1770::IndexHoleTarget); \
|
||||||
status_.spin_up = true;
|
status_.spin_up = true;
|
||||||
|
|
||||||
// +--------+----------+-------------------------+
|
|
||||||
// ! ! ! BITS !
|
|
||||||
// ! TYPE ! COMMAND ! 7 6 5 4 3 2 1 0 !
|
|
||||||
// +--------+----------+-------------------------+
|
|
||||||
// ! 1 ! Restore ! 0 0 0 0 h v r1 r0 !
|
|
||||||
// ! 1 ! Seek ! 0 0 0 1 h v r1 r0 !
|
|
||||||
// ! 1 ! Step ! 0 0 1 u h v r1 r0 !
|
|
||||||
// ! 1 ! Step-in ! 0 1 0 u h v r1 r0 !
|
|
||||||
// ! 1 ! Step-out ! 0 1 1 u h v r1 r0 !
|
|
||||||
// ! 2 ! Rd sectr ! 1 0 0 m h E 0 0 !
|
|
||||||
// ! 2 ! Wt sectr ! 1 0 1 m h E P a0 !
|
|
||||||
// ! 3 ! Rd addr ! 1 1 0 0 h E 0 0 !
|
|
||||||
// ! 3 ! Rd track ! 1 1 1 0 h E 0 0 !
|
|
||||||
// ! 3 ! Wt track ! 1 1 1 1 h E P 0 !
|
|
||||||
// ! 4 ! Forc int ! 1 1 0 1 i3 i2 i1 i0 !
|
|
||||||
// +--------+----------+-------------------------+
|
|
||||||
|
|
||||||
void WD1770::posit_event(const int new_event_type) {
|
|
||||||
if(new_event_type == int(Event::IndexHole)) {
|
if(new_event_type == int(Event::IndexHole)) {
|
||||||
index_hole_count_++;
|
index_hole_count_++;
|
||||||
if(index_hole_count_target_ == index_hole_count_) {
|
if(index_hole_count_target_ == index_hole_count_) {
|
||||||
@@ -209,6 +194,23 @@ void WD1770::posit_event(const int new_event_type) {
|
|||||||
interesting_event_mask_ &= ~new_event_type;
|
interesting_event_mask_ &= ~new_event_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// +--------+----------+-------------------------+
|
||||||
|
// ! ! ! BITS !
|
||||||
|
// ! TYPE ! COMMAND ! 7 6 5 4 3 2 1 0 !
|
||||||
|
// +--------+----------+-------------------------+
|
||||||
|
// ! 1 ! Restore ! 0 0 0 0 h v r1 r0 !
|
||||||
|
// ! 1 ! Seek ! 0 0 0 1 h v r1 r0 !
|
||||||
|
// ! 1 ! Step ! 0 0 1 u h v r1 r0 !
|
||||||
|
// ! 1 ! Step-in ! 0 1 0 u h v r1 r0 !
|
||||||
|
// ! 1 ! Step-out ! 0 1 1 u h v r1 r0 !
|
||||||
|
// ! 2 ! Rd sectr ! 1 0 0 m h E 0 0 !
|
||||||
|
// ! 2 ! Wt sectr ! 1 0 1 m h E P a0 !
|
||||||
|
// ! 3 ! Rd addr ! 1 1 0 0 h E 0 0 !
|
||||||
|
// ! 3 ! Rd track ! 1 1 1 0 h E 0 0 !
|
||||||
|
// ! 3 ! Wt track ! 1 1 1 1 h E P 0 !
|
||||||
|
// ! 4 ! Forc int ! 1 1 0 1 i3 i2 i1 i0 !
|
||||||
|
// +--------+----------+-------------------------+
|
||||||
|
|
||||||
BEGIN_SECTION()
|
BEGIN_SECTION()
|
||||||
|
|
||||||
// Wait for a new command, branch to the appropriate handler.
|
// Wait for a new command, branch to the appropriate handler.
|
||||||
@@ -417,7 +419,7 @@ void WD1770::posit_event(const int new_event_type) {
|
|||||||
WAIT_FOR_TIME(30);
|
WAIT_FOR_TIME(30);
|
||||||
|
|
||||||
test_type2_write_protection:
|
test_type2_write_protection:
|
||||||
if(command_&0x20 && get_drive().get_is_read_only()) {
|
if(command_&0x20 && get_drive().is_read_only()) {
|
||||||
update_status([] (Status &status) {
|
update_status([] (Status &status) {
|
||||||
status.write_protect = true;
|
status.write_protect = true;
|
||||||
});
|
});
|
||||||
@@ -716,7 +718,7 @@ void WD1770::posit_event(const int new_event_type) {
|
|||||||
status.lost_data = false;
|
status.lost_data = false;
|
||||||
});
|
});
|
||||||
|
|
||||||
if(get_drive().get_is_read_only()) {
|
if(get_drive().is_read_only()) {
|
||||||
update_status([] (Status &status) {
|
update_status([] (Status &status) {
|
||||||
status.write_protect = true;
|
status.write_protect = true;
|
||||||
});
|
});
|
||||||
@@ -818,7 +820,7 @@ void WD1770::update_status(const std::function<void(Status &)> updater) {
|
|||||||
(status_.busy != old_status.busy) ||
|
(status_.busy != old_status.busy) ||
|
||||||
(status_.data_request != old_status.data_request) ||
|
(status_.data_request != old_status.data_request) ||
|
||||||
(status_.interrupt_request != old_status.interrupt_request);
|
(status_.interrupt_request != old_status.interrupt_request);
|
||||||
if(did_change) delegate_->wd1770_did_change_output(this);
|
if(did_change) delegate_->wd1770_did_change_output(*this);
|
||||||
} else updater(status_);
|
} else updater(status_);
|
||||||
|
|
||||||
if(status_.busy != old_status.busy) update_clocking_observer();
|
if(status_.busy != old_status.busy) update_clocking_observer();
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../../Storage/Disk/Controller/MFMDiskController.hpp"
|
#include "Storage/Disk/Controller/MFMDiskController.hpp"
|
||||||
|
|
||||||
namespace WD {
|
namespace WD {
|
||||||
|
|
||||||
@@ -66,9 +66,8 @@ public:
|
|||||||
/// @returns The current value of the DRQ line output.
|
/// @returns The current value of the DRQ line output.
|
||||||
inline bool get_data_request_line() const { return status_.data_request; }
|
inline bool get_data_request_line() const { return status_.data_request; }
|
||||||
|
|
||||||
class Delegate {
|
struct Delegate {
|
||||||
public:
|
virtual void wd1770_did_change_output(WD1770 &) = 0;
|
||||||
virtual void wd1770_did_change_output(WD1770 *wd1770) = 0;
|
|
||||||
};
|
};
|
||||||
inline void set_delegate(Delegate *delegate) { delegate_ = delegate; }
|
inline void set_delegate(Delegate *delegate) { delegate_ = delegate; }
|
||||||
|
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
#include "ncr5380.hpp"
|
#include "ncr5380.hpp"
|
||||||
|
|
||||||
#include "../../Outputs/Log.hpp"
|
#include "Outputs/Log.hpp"
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
Log::Logger<Log::Source::NCR5380> logger;
|
Log::Logger<Log::Source::NCR5380> logger;
|
||||||
@@ -25,7 +25,7 @@ NCR5380::NCR5380(SCSI::Bus &bus, const int clock_rate) :
|
|||||||
bus_(bus),
|
bus_(bus),
|
||||||
clock_rate_(clock_rate) {
|
clock_rate_(clock_rate) {
|
||||||
device_id_ = bus_.add_device();
|
device_id_ = bus_.add_device();
|
||||||
bus_.add_observer(this);
|
bus_.add_observer(*this);
|
||||||
|
|
||||||
// TODO: use clock rate and expected phase. This implementation currently
|
// TODO: use clock rate and expected phase. This implementation currently
|
||||||
// provides only CPU-driven polling behaviour.
|
// provides only CPU-driven polling behaviour.
|
||||||
@@ -146,12 +146,12 @@ void NCR5380::write(const int address, const uint8_t value, bool) {
|
|||||||
uint8_t NCR5380::read(const int address, bool) {
|
uint8_t NCR5380::read(const int address, bool) {
|
||||||
switch(address & 7) {
|
switch(address & 7) {
|
||||||
case 0:
|
case 0:
|
||||||
logger.info().append("[0] Get current SCSI bus state: %02x", (bus_.get_state() & 0xff));
|
logger.info().append("[0] Get current SCSI bus state: %02x", (bus_.state() & 0xff));
|
||||||
|
|
||||||
if(dma_request_ && dma_operation_ == DMAOperation::InitiatorReceive) {
|
if(dma_request_ && dma_operation_ == DMAOperation::InitiatorReceive) {
|
||||||
return dma_acknowledge();
|
return dma_acknowledge();
|
||||||
}
|
}
|
||||||
return uint8_t(bus_.get_state());
|
return uint8_t(bus_.state());
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
logger.info().append(
|
logger.info().append(
|
||||||
@@ -177,7 +177,7 @@ uint8_t NCR5380::read(const int address, bool) {
|
|||||||
return target_command_;
|
return target_command_;
|
||||||
|
|
||||||
case 4: {
|
case 4: {
|
||||||
const auto bus_state = bus_.get_state();
|
const auto bus_state = bus_.state();
|
||||||
const uint8_t result =
|
const uint8_t result =
|
||||||
((bus_state & Line::Reset) ? 0x80 : 0x00) |
|
((bus_state & Line::Reset) ? 0x80 : 0x00) |
|
||||||
((bus_state & Line::Busy) ? 0x40 : 0x00) |
|
((bus_state & Line::Busy) ? 0x40 : 0x00) |
|
||||||
@@ -192,7 +192,7 @@ uint8_t NCR5380::read(const int address, bool) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
case 5: {
|
case 5: {
|
||||||
const auto bus_state = bus_.get_state();
|
const auto bus_state = bus_.state();
|
||||||
const uint8_t result =
|
const uint8_t result =
|
||||||
(end_of_dma_ ? 0x80 : 0x00) |
|
(end_of_dma_ ? 0x80 : 0x00) |
|
||||||
((dma_request_ && state_ == ExecutionState::PerformingDMA) ? 0x40 : 0x00) |
|
((dma_request_ && state_ == ExecutionState::PerformingDMA) ? 0x40 : 0x00) |
|
||||||
@@ -242,7 +242,7 @@ void NCR5380::update_control_output() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void NCR5380::scsi_bus_did_change(SCSI::Bus *, const SCSI::BusState new_state, const double time_since_change) {
|
void NCR5380::scsi_bus_did_change(SCSI::Bus &, const SCSI::BusState new_state, const double time_since_change) {
|
||||||
/*
|
/*
|
||||||
When connected as an Initiator with DMA Mode True,
|
When connected as an Initiator with DMA Mode True,
|
||||||
if the phase lines I//O, C//D, and /MSG do not match the
|
if the phase lines I//O, C//D, and /MSG do not match the
|
||||||
@@ -350,7 +350,7 @@ bool NCR5380::dma_request() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
uint8_t NCR5380::dma_acknowledge() {
|
uint8_t NCR5380::dma_acknowledge() {
|
||||||
const uint8_t bus_state = uint8_t(bus_.get_state());
|
const uint8_t bus_state = uint8_t(bus_.state());
|
||||||
|
|
||||||
dma_acknowledge_ = true;
|
dma_acknowledge_ = true;
|
||||||
dma_request_ = false;
|
dma_request_ = false;
|
||||||
@@ -370,7 +370,7 @@ void NCR5380::dma_acknowledge(const uint8_t value) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool NCR5380::phase_matches() const {
|
bool NCR5380::phase_matches() const {
|
||||||
const auto bus_state = bus_.get_state();
|
const auto bus_state = bus_.state();
|
||||||
return
|
return
|
||||||
(target_output() & (Line::Message | Line::Control | Line::Input)) ==
|
(target_output() & (Line::Message | Line::Control | Line::Input)) ==
|
||||||
(bus_state & (Line::Message | Line::Control | Line::Input));
|
(bus_state & (Line::Message | Line::Control | Line::Input));
|
||||||
|
@@ -8,11 +8,9 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "Storage/MassStorage/SCSI/SCSI.hpp"
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
#include "../../Storage/MassStorage/SCSI/SCSI.hpp"
|
|
||||||
|
|
||||||
|
|
||||||
namespace NCR::NCR5380 {
|
namespace NCR::NCR5380 {
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -80,7 +78,7 @@ private:
|
|||||||
SCSI::BusState target_output() const;
|
SCSI::BusState target_output() const;
|
||||||
void update_control_output();
|
void update_control_output();
|
||||||
|
|
||||||
void scsi_bus_did_change(SCSI::Bus *, SCSI::BusState new_state, double time_since_change) final;
|
void scsi_bus_did_change(SCSI::Bus &, SCSI::BusState, double) final;
|
||||||
bool phase_matches() const;
|
bool phase_matches() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -8,12 +8,10 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "Components/6522/Implementation/6522Storage.hpp"
|
||||||
|
#include "ClockReceiver/ClockReceiver.hpp"
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
#include "Implementation/6522Storage.hpp"
|
|
||||||
|
|
||||||
#include "../../ClockReceiver/ClockReceiver.hpp"
|
|
||||||
|
|
||||||
namespace MOS::MOS6522 {
|
namespace MOS::MOS6522 {
|
||||||
|
|
||||||
enum Port {
|
enum Port {
|
||||||
@@ -62,10 +60,9 @@ public:
|
|||||||
*/
|
*/
|
||||||
class IRQDelegatePortHandler: public PortHandler {
|
class IRQDelegatePortHandler: public PortHandler {
|
||||||
public:
|
public:
|
||||||
class Delegate {
|
struct Delegate {
|
||||||
public:
|
/// Indicates that the interrupt status has changed for the IRQDelegatePortHandler provided.
|
||||||
/// Indicates that the interrupt status has changed for the IRQDelegatePortHandler provided.
|
virtual void mos6522_did_change_interrupt_status(void *irq_delegate) = 0;
|
||||||
virtual void mos6522_did_change_interrupt_status(void *irq_delegate) = 0;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Sets the delegate that will receive notification of changes in the interrupt line.
|
/// Sets the delegate that will receive notification of changes in the interrupt line.
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
// Copyright 2017 Thomas Harte. All rights reserved.
|
// Copyright 2017 Thomas Harte. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
#include "../../../Outputs/Log.hpp"
|
#include "Outputs/Log.hpp"
|
||||||
|
|
||||||
// As-yet unimplemented (incomplete list):
|
// As-yet unimplemented (incomplete list):
|
||||||
//
|
//
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
// Copyright 2017 Thomas Harte. All rights reserved.
|
// Copyright 2017 Thomas Harte. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
#include "../6522.hpp"
|
#include "Components/6522/6522.hpp"
|
||||||
|
|
||||||
using namespace MOS::MOS6522;
|
using namespace MOS::MOS6522;
|
||||||
|
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
#include "Implementation/6526Storage.hpp"
|
#include "Implementation/6526Storage.hpp"
|
||||||
#include "../Serial/Line.hpp"
|
#include "Components/Serial/Line.hpp"
|
||||||
|
|
||||||
namespace MOS::MOS6526 {
|
namespace MOS::MOS6526 {
|
||||||
|
|
||||||
|
@@ -10,8 +10,8 @@
|
|||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
|
|
||||||
#include "../../../ClockReceiver/ClockReceiver.hpp"
|
#include "ClockReceiver/ClockReceiver.hpp"
|
||||||
#include "../../../Outputs/Log.hpp"
|
#include "Outputs/Log.hpp"
|
||||||
|
|
||||||
namespace MOS::MOS6526 {
|
namespace MOS::MOS6526 {
|
||||||
|
|
||||||
@@ -125,11 +125,11 @@ private:
|
|||||||
uint32_t alarm_ = 0xff'ffff;
|
uint32_t alarm_ = 0xff'ffff;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
template <int byte> void write(uint8_t v) {
|
template <int byte> void write(const uint8_t v) {
|
||||||
if constexpr (byte == 3) {
|
if constexpr (byte == 3) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
constexpr int shift = byte << 3;
|
static constexpr int shift = byte << 3;
|
||||||
|
|
||||||
// Write to either the alarm or the current value as directed;
|
// Write to either the alarm or the current value as directed;
|
||||||
// writing to any part of the current value other than the LSB
|
// writing to any part of the current value other than the LSB
|
||||||
@@ -147,7 +147,7 @@ public:
|
|||||||
if constexpr (byte == 3) {
|
if constexpr (byte == 3) {
|
||||||
return 0xff; // Assumed. Just a guess.
|
return 0xff; // Assumed. Just a guess.
|
||||||
}
|
}
|
||||||
constexpr int shift = byte << 3;
|
static constexpr int shift = byte << 3;
|
||||||
|
|
||||||
if constexpr (byte == 2) {
|
if constexpr (byte == 2) {
|
||||||
latch_ = value_ | 0xff00'0000;
|
latch_ = value_ | 0xff00'0000;
|
||||||
@@ -163,7 +163,7 @@ public:
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool advance(int count) {
|
bool advance(const int count) {
|
||||||
// The 8250 uses a simple binary counter to replace the
|
// The 8250 uses a simple binary counter to replace the
|
||||||
// 6526's time-of-day clock. So this is easy.
|
// 6526's time-of-day clock. So this is easy.
|
||||||
const uint32_t distance_to_alarm = (alarm_ - value_) & 0xff'ffff;
|
const uint32_t distance_to_alarm = (alarm_ - value_) & 0xff'ffff;
|
||||||
|
@@ -8,11 +8,11 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "ClockReceiver/ClockReceiver.hpp"
|
||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
|
||||||
#include "../../ClockReceiver/ClockReceiver.hpp"
|
|
||||||
|
|
||||||
namespace MOS {
|
namespace MOS {
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@@ -97,19 +97,29 @@ constexpr uint8_t noise_pattern[] = {
|
|||||||
0xf0, 0xe1, 0xe0, 0x78, 0x70, 0x38, 0x3c, 0x3e, 0x1e, 0x3c, 0x1e, 0x1c, 0x70, 0x3c, 0x38, 0x3f,
|
0xf0, 0xe1, 0xe0, 0x78, 0x70, 0x38, 0x3c, 0x3e, 0x1e, 0x3c, 0x1e, 0x1c, 0x70, 0x3c, 0x38, 0x3f,
|
||||||
};
|
};
|
||||||
|
|
||||||
#define shift(r) shift_registers_[r] = \
|
|
||||||
(shift_registers_[r] << 1) | (((shift_registers_[r]^0x80)&control_registers_[r]) >> 7)
|
|
||||||
#define increment(r) shift_registers_[r] = (shift_registers_[r]+1)%8191
|
|
||||||
#define update(r, m, up) \
|
|
||||||
counters_[r]++; if((counters_[r] >> m) == 0x80) { up(r); counters_[r] = unsigned(control_registers_[r]&0x7f) << m; }
|
|
||||||
// Note on slightly askew test: as far as I can make out, if the value in the register is 0x7f then what's supposed to
|
|
||||||
// happen is that the 0x7f is loaded, on the next clocked cycle the Vic spots a 0x7f, pumps the output, reloads, etc. No
|
|
||||||
// increment ever occurs. It's conditional. I don't really want two conditionals if I can avoid it so I'm incrementing
|
|
||||||
// regardless and testing against 0x80. The effect should be the same: loading with 0x7f means an output update every
|
|
||||||
// cycle, loading with 0x7e means every second cycle, etc.
|
|
||||||
|
|
||||||
template <Outputs::Speaker::Action action>
|
template <Outputs::Speaker::Action action>
|
||||||
void AudioGenerator::apply_samples(const std::size_t number_of_samples, Outputs::Speaker::MonoSample *const target) {
|
void AudioGenerator::apply_samples(const std::size_t number_of_samples, Outputs::Speaker::MonoSample *const target) {
|
||||||
|
const auto shift = [&](const int r) {
|
||||||
|
shift_registers_[r] =
|
||||||
|
(shift_registers_[r] << 1) | (((shift_registers_[r] ^ 0x80) & control_registers_[r]) >> 7);
|
||||||
|
};
|
||||||
|
const auto increment = [&](const int r) {
|
||||||
|
shift_registers_[r] = (shift_registers_[r] + 1) % 8191;
|
||||||
|
};
|
||||||
|
const auto update = [&](const int r, const int m, auto &&up) {
|
||||||
|
++counters_[r];
|
||||||
|
|
||||||
|
if((counters_[r] >> m) == 0x80) {
|
||||||
|
up(r);
|
||||||
|
counters_[r] = unsigned(control_registers_[r]&0x7f) << m;
|
||||||
|
}
|
||||||
|
// Note on slightly askew test: as far as I can make out, if the value in the register is 0x7f then what's
|
||||||
|
// supposed to happen is that the 0x7f is loaded, on the next clocked cycle the Vic spots a 0x7f, pumps the
|
||||||
|
// output, reloads, etc. No increment ever occurs. It's conditional. I don't really want two conditionals if I
|
||||||
|
// can avoid it so I'm incrementing regardless and testing against 0x80. The effect should be the same: loading
|
||||||
|
// with 0x7f means an output update every cycle, loading with 0x7e means every second cycle, etc.
|
||||||
|
};
|
||||||
|
|
||||||
for(unsigned int c = 0; c < number_of_samples; ++c) {
|
for(unsigned int c = 0; c < number_of_samples; ++c) {
|
||||||
update(0, 2, shift);
|
update(0, 2, shift);
|
||||||
update(1, 1, shift);
|
update(1, 1, shift);
|
||||||
|
@@ -8,11 +8,11 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../../ClockReceiver/ClockReceiver.hpp"
|
#include "ClockReceiver/ClockReceiver.hpp"
|
||||||
#include "../../Concurrency/AsyncTaskQueue.hpp"
|
#include "Concurrency/AsyncTaskQueue.hpp"
|
||||||
#include "../../Outputs/CRT/CRT.hpp"
|
#include "Outputs/CRT/CRT.hpp"
|
||||||
#include "../../Outputs/Speaker/Implementation/LowpassSpeaker.hpp"
|
#include "Outputs/Speaker/Implementation/LowpassSpeaker.hpp"
|
||||||
#include "../../Outputs/Speaker/Implementation/BufferSource.hpp"
|
#include "Outputs/Speaker/Implementation/BufferSource.hpp"
|
||||||
|
|
||||||
namespace MOS::MOS6560 {
|
namespace MOS::MOS6560 {
|
||||||
|
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../../ClockReceiver/ClockReceiver.hpp"
|
#include "ClockReceiver/ClockReceiver.hpp"
|
||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
@@ -29,8 +29,8 @@ struct BusState {
|
|||||||
};
|
};
|
||||||
|
|
||||||
class BusHandler {
|
class BusHandler {
|
||||||
public:
|
public:
|
||||||
void perform_bus_cycle(const BusState &) {}
|
void perform_bus_cycle(const BusState &) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
enum class Personality {
|
enum class Personality {
|
||||||
@@ -96,7 +96,7 @@ public:
|
|||||||
target = (target & 0xff00) | value;
|
target = (target & 0xff00) | value;
|
||||||
};
|
};
|
||||||
const auto load_high = [value](uint16_t &target) {
|
const auto load_high = [value](uint16_t &target) {
|
||||||
constexpr uint8_t mask = RefreshMask >> 8;
|
static constexpr uint8_t mask = RefreshMask >> 8;
|
||||||
target = uint16_t((target & 0x00ff) | ((value & mask) << 8));
|
target = uint16_t((target & 0x00ff) | ((value & mask) << 8));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user