Commit Graph

108 Commits

Author SHA1 Message Date
Michael Steil 268d16647c fixed measure.c to work with new API 2020-06-13 19:18:57 +02:00
Tom Seddon 350f4b27e0 Add destroyChip. 2019-09-08 15:06:26 +02:00
Michael Steil 4142ac152e moved nodes names into netlist_6502.h 2014-12-01 16:42:48 +01:00
Michael Steil 0269c1bdf1 cleanups 2014-12-01 14:03:16 +01:00
Michael Steil 76d798db79 split code into generic netlist simulation and 6502-specific code 2014-12-01 13:53:46 +01:00
Michael Steil 44cde717a1 cleanup 2014-12-01 13:29:08 +01:00
Michael Steil c93f229339 cleanup 2014-12-01 13:10:28 +01:00
Michael Steil 79d5e114ef cleanups 2014-12-01 12:44:03 +01:00
Michael Steil c7ede71e52 actually de-dup transistors! 2014-12-01 12:31:14 +01:00
Michael Steil e49ca0be5f cleanups 2014-12-01 12:23:47 +01:00
Michael Steil b31b545032 malloc'ed all state instead of having a gigantic struct
state_t is now 208 bytes on x86_64 instead of 26 MB. Startup is a little slower though because of ~7000 malloc calls.
2014-12-01 12:10:21 +01:00
Michael Steil fc3082a259 updated copyright 2014-12-01 11:01:11 +01:00
Michael Steil c4f7cfb449 The state pointer is no longer global, but passed down to every function.
...and surprisingly, it's not any slower. if anything, it's 1% faster.
2014-12-01 11:00:30 +01:00
Michael Steil b8af4edbbe moved all globals into a single global struct -> 3% speedup with clang :) 2014-11-29 00:55:06 +01:00
Michael Steil b2cce88620 optimizations (~25%) and cleanup
Optimizations:
1. When a transistor is turned on, only add one of the nodes it
   controls to listout, otherwise group calculation would be done twice
   for this group. This simplifies recalcNodeList(). (This required
   the following change: Instead of adding the nodes that control
   transistors that have changed to listout, put the nodes that are
   switched by transistors on listout.)
2. The group value is calculated while collecting nodes, and the enum
   group_contains_value makes sure we don't check for weaker value
   indicators than have already been established.
3. listout is now a set, no node will be visited twice for group
   calculation, within one interation.
4. When setting input pins of the package to a value, only recalc the
   node if it actually changes.
5. Toggling a transistor is done by assigning it the group value
   instead of the inverse of its value.

Cleanup:
* Merge the concept of listin with the concept of nodes that change
  from the outside and trigger a recalc.
2014-11-28 07:04:07 +01:00
Michael Steil f424b464f2 cleanup 2010-10-08 04:09:56 +00:00
Michael Steil 48e5756c38 cleanup 2010-10-08 03:58:09 +00:00
Michael Steil 8d948b5f64 indirect lostout 2010-10-08 03:22:54 +00:00
Michael Steil d9ba3fc769 experimental... 2010-10-07 05:20:49 +00:00
Michael Steil c0d191a03f added concept of dependants - same speed, but might
lead to more optimization opportunities
2010-10-07 04:39:40 +00:00
Michael Steil 6e8fd7f401 debug code; eliminate more duplicate transistors (with c1 and c2 reversed) 2010-10-07 02:19:44 +00:00
Michael Steil 07d31a1529 cleanup 2010-10-07 00:28:02 +00:00
Michael Steil 44f7f48a9c fixed "broken transistors" test 2010-10-06 16:53:40 +00:00
Michael Steil f8fe8d9d46 made test work independently 2010-10-06 16:33:26 +00:00
Michael Steil a2ad35412c separated emulator and runtime 2010-10-06 15:58:13 +00:00
Michael Steil c53fa8ff9c cleanup 2010-10-06 04:32:54 +00:00
Michael Steil 7c58dfd703 memory read and write on the same edge now; cleanup 2010-10-06 03:00:20 +00:00
Michael Steil 4b95933e67 bitmap size fix -> 10% faster 2010-10-06 02:13:38 +00:00
Michael Steil 1b22b7fec9 rename 2010-10-05 18:20:02 +00:00
Michael Steil 4189c81c70 cleanup, restore missing loop exit case 2010-10-05 18:13:48 +00:00
Michael Steil 57d2ce2c91 cleanup 2010-10-05 18:01:13 +00:00
Michael Steil 44ea268beb don't track "floating" any more. much easier, same speed 2010-10-05 17:54:51 +00:00
Michael Steil 12e8208234 cleanup 2010-10-05 17:48:01 +00:00
Michael Steil 446774eaa3 cleanup 2010-10-05 16:54:12 +00:00
Michael Steil eee151c3ec nicer getNodeValue() interface, same speed 2010-10-05 16:46:27 +00:00
Michael Steil 90dfd9791a cleanup 2010-10-05 16:27:33 +00:00
Michael Steil 3ef6b7636a cleanup 2010-10-05 16:18:28 +00:00
Michael Steil f101c89980 emulator / tester work 2010-09-30 02:39:11 +00:00
Michael Steil 5b43898aae code to test instructions 2010-09-29 03:19:56 +00:00
Michael Steil e292c84c3a breaking transistors 2010-09-28 17:22:57 +00:00
Michael Steil a0034447c1 the cross reference was looking at nonexistant transistors 2010-09-27 17:31:20 +00:00
Michael Steil c252b42304 ... 2010-09-26 03:54:11 +00:00
Michael Steil edffe73bc1 ... 2010-09-26 03:50:55 +00:00
Michael Steil bfe8db1446 ... 2010-09-26 03:19:21 +00:00
Michael Steil a4f19434f7 ... 2010-09-26 02:59:31 +00:00
Michael Steil 7a1e8b457b outputs 2010-09-26 00:09:19 +00:00
Michael Steil 0866a57020 better addmodes 2010-09-25 23:17:22 +00:00
Michael Steil c856cb77a2 addressing modes 2010-09-25 23:04:04 +00:00
Michael Steil fde0610048 better bytes calc 2010-09-25 22:04:04 +00:00
Michael Steil 41c5cb4dcd first checkin for 6502 analysis 2010-09-25 21:34:53 +00:00