b7eb00b5a7
Move bus topology ownership to bus elements.
Florian Nücke
2020-12-14 14:10:39 +01:00
61b45aa351
Interrupt zero is borked. Not sure if that's a Linux thing, the PLIC implementation being broken, or something else entirely. Just reserve it for now.
Florian Nücke
2020-12-14 14:02:08 +01:00
b53f85cca2
Analogous to interrupt allocator added memory range allocator for adding devices.
Florian Nücke
2020-12-12 13:35:58 +01:00
d4fffc40b9
VM device interrupts zero based since we use them for masking anyway.
Florian Nücke
2020-12-12 12:36:10 +01:00
4ebc722126
Reworking vm device adapter and adding tests for it.
Florian Nücke
2020-12-12 12:09:44 +01:00
117e17a6b6
Some formatting, documenting and cleanup.
Florian Nücke
2020-12-12 02:44:11 +01:00
62965b9356
One more device shuffle.
Florian Nücke
2020-12-11 18:23:17 +01:00
c6980fba77
Some more package shuffling.
Florian Nücke
2020-12-11 18:20:16 +01:00
62c7e658c5
Moved some packages to more logical places and aligned implementation with api package structure.
Florian Nücke
2020-12-11 18:17:06 +01:00
a4e143a67c
Use MC time for in-VM times. This may be a mistake.
Florian Nücke
2020-12-11 05:51:29 +01:00
896130189f
Add realtime counter that uses MC world game-time ticks.
Florian Nücke
2020-12-11 05:50:58 +01:00
d15a09c3cd
Don't render terminal while computer is not running.
Florian Nücke
2020-12-11 02:04:07 +01:00
7b55e0ec1d
Add logic for toggling bus cable connectivity.
Florian Nücke
2020-12-11 00:42:08 +01:00
6e4a5ef826
Added model for cable.
Florian Nücke
2020-12-10 23:52:08 +01:00
fedaee678a
Render status on computer based on bus/run state.
Florian Nücke
2020-12-09 13:12:41 +01:00
abe81d74aa
Make bus element in computer check neighbors on neighbor change.
Florian Nücke
2020-12-09 13:12:24 +01:00
772e592558
Add network messages for bus and run states.
Florian Nücke
2020-12-09 13:12:06 +01:00
b7fc45f958
Fixed state in controller, added state for incomplete scans and re-scanning for too complex ones automatically (because we won't be notified of changes in that case anymore).
Florian Nücke
2020-12-09 13:11:16 +01:00
fb52a2e8d7
Moved messages to package.
Florian Nücke
2020-12-09 13:09:54 +01:00
423d8cd037
"Randomize" cursor blinking timing offset so that not all terminals blink at the same time.
Florian Nücke
2020-12-09 13:03:40 +01:00
b465dd61c6
Allow specifying name in Callback explicitly, added interface for alternative way of providing callback documentation that doesn't clutter the method declaration.
Florian Nücke
2020-12-06 19:13:41 +01:00
da5849a54a
Static imports for less clutter.
Florian Nücke
2020-12-06 19:10:38 +01:00
f79ccd6a22
Only send terminal data packet if its not empty..
Florian Nücke
2020-12-05 00:03:32 +01:00
417875d114
rpc adapter reset should not include devices as this is unrelated to vm run state.
Florian Nücke
2020-12-05 00:03:12 +01:00
59b92be93f
Working on generalizing device bus to allow different device types. Make bus elements source of identifiers in API, too, since they are also in implementation.
Florian Nücke
2020-12-04 23:44:00 +01:00
c777fe3e3a
Fixed global scheduler.
Florian Nücke
2020-12-02 20:16:12 +01:00
89d92f3afb
Updated computer tile entity, made persistence work again, prep for item based devices.
Florian Nücke
2020-12-02 20:16:02 +01:00
18ad8d4670
Some package shuffling.
Florian Nücke
2020-12-02 11:18:12 +01:00
b930e7427f
Model and texture update.
Florian Nücke
2020-12-02 02:01:01 +01:00
cf82fbe6f3
Convenience sided init/dispose in tile entity base class.
Florian Nücke
2020-12-02 01:58:54 +01:00
c9931123c8
Split up bus controller implementation and RPC logic and properly catch multiple controllers on one bus.
Florian Nücke
2020-12-02 01:43:45 +01:00
47c4486a1b
Preparing for detection of multiple controllers per bus.
Florian Nücke
2020-12-02 00:15:23 +01:00
1c43ff1a6a
Renamed Device -> DeviceInterface, IdentifiableDevice -> Device because that's more accurately what they are/represent.
Florian Nücke
2020-12-01 20:30:38 +01:00
796ca0e0d1
Deduplicating devices on a bus.
Florian Nücke
2020-12-01 19:54:49 +01:00
ac3e809b55
Remove TileEntityUtils, too reliant on LazyOptional already anyway.
Florian Nücke
2020-12-01 17:27:30 +01:00
3f7f3b05b2
Add tile entity and logic for redstone interface block.
Florian Nücke
2020-12-01 02:43:27 +01:00
62396f158f
Append extra name instead of prefixing it.
Florian Nücke
2020-12-01 02:43:03 +01:00
5658a9367f
Don't serialize nulls, leads to "null" userdata after cjson deserialization.
Florian Nücke
2020-12-01 02:42:31 +01:00
20d87d8b9a
Add utility providers for tile entities and blocks which provide Callback annotated methods.
Florian Nücke
2020-12-01 02:42:07 +01:00
888933456d
Improve provider base class reusability.
Florian Nücke
2020-12-01 02:41:14 +01:00
b2cb09b4ee
Utility for grabbing a name for a tile entity or block.
Florian Nücke
2020-12-01 02:40:44 +01:00
3156568e1c
Add interface to allow specifying additional type names in ObjectDevice targets.
Florian Nücke
2020-12-01 02:39:57 +01:00
8a2dbee1ba
Add ability to check for methods without instantiating them.
Florian Nücke
2020-12-01 02:39:37 +01:00
d0f4f632f4
Allow null for typeName for convenience.
Florian Nücke
2020-12-01 02:39:14 +01:00
d3116edf36
Flip default for callback synchronization. Synced is likely to be more common and the safer default.
Florian Nücke
2020-11-30 19:30:07 +01:00
68def32f52
Add block id as main type name for block devices.
Florian Nücke
2020-11-30 18:57:14 +01:00
f5745c4a16
Bus tests.
Florian Nücke
2020-11-30 18:37:10 +01:00
bbd98e9a84
Pulled out serializers.
Florian Nücke
2020-11-30 18:37:01 +01:00
6a4b787729
Some built-in providers for default capabilities.
Florian Nücke
2020-11-30 18:36:11 +01:00
656822bbb6
Add bus cable block.
Florian Nücke
2020-11-30 18:35:21 +01:00
f13042d3d2
API for adding device providers and custom parameter serializers.
Florian Nücke
2020-11-30 18:34:06 +01:00
7a0f0ecc0f
API for device queries.
Florian Nücke
2020-11-30 18:26:45 +01:00
35f5f2e2b6
Add logic to allow synchronizing methods to main thread.
Florian Nücke
2020-11-29 17:37:20 +01:00
11e612c789
Pull out safe tile entity getter into utility class.
Florian Nücke
2020-11-29 13:39:12 +01:00
68666c6751
equals and hashcode for ObjectDeviceMethod.
Florian Nücke
2020-11-29 13:38:31 +01:00
0ea992dac2
Remove abstract device class; not really worth it.
Florian Nücke
2020-11-29 13:38:17 +01:00
fd70381f31
Split out identifier for devices into separate sub-interface. It's only needed at bus level so we can wrap at that point.
Florian Nücke
2020-11-29 13:36:34 +01:00
3839ee5da4
First device API draft.
Florian Nücke
2020-11-28 23:05:24 +01:00
82d4e0b863
Removed client side test item.
Florian Nücke
2020-11-28 23:04:44 +01:00
51156661e4
Small rename.
Florian Nücke
2020-10-28 16:26:35 +01:00
61a08e7f3d
Add generic system controller and custom controller for R5 to support power-off/reset.
Florian Nücke
2020-10-27 21:29:33 +01:00
d5d8bfd6c7
Expose initialize method for annotation-based lookup to control when it happens. Since this can be pretty expensive we run it in a separate thread where possible.
Florian Nücke
2020-10-27 16:18:37 +01:00
fdfd11e4a8
Some placeholder blocks.
Florian Nücke
2020-10-27 15:53:46 +01:00