35 Commits

Author SHA1 Message Date
Gorilla Sapiens
b6f42f9ab2 changed "spc" to "c_sp" 2025-06-04 06:37:59 +00:00
Gorilla Sapiens
3d118dc6e5 rename "sp" to "spc", avoid conflict with 4510 opcodes 2025-06-04 02:06:40 +00:00
sidney
988260c699 sim65: add C/assembly support, docs, and samples for the new peripheral functionality.
This PR is the second of two PRs that replaces earlier PRs #2589 and #2590. Due to a git branching mishap it was decided to re-partition the new functionality in two sequential PRs that offer self-contained, new functionality to sim65.

The functionality in this second and last PR provides the following things in relation to the new "peripheral" support:

* C support: there is now an include/sim65.h that can be included from C. It provides access to the memory-mapped peripheral addresses.

* Asm support: there is now an asminc/sim65.inc that can be included from assembly. It provides symbolic labels for the memory-mapped peripheral addresses.

Note: the two items above are implemented by adding a "_peripherals" symbol to cfg/sim6502.cfg and cfg/sim65c02.cfg, with the fixed base address of the peripherals memory aperture (0xffc0).

* Updated the sim65 documentation to describe the peripherals in some detail, with examples that show to use the new features from within C.

* Some examples in the new samples/sim5/ directory. These are currently not integrated in the build system (in other words, there's no Makefile there), because I don't know how to do that. I will happily implement that after #2582 is taken care of.

If that is not acceptable, the next best thing will be for somebody else (who understands how the Makefiles are set up) to take care of this.

If that's not going to happen, and we don't want examples that are not properly integrated with the build system, there's always the option of removing these samples from the PR.
2025-01-05 15:58:05 +01:00
sidney
a8581d042f Improved description. 2024-12-31 18:32:11 +01:00
sidney
b2851be340 Fixed several typos. 2024-12-31 18:20:11 +01:00
sidney
915416dc66 Added example. 2024-12-31 18:11:35 +01:00
sidney
d8df73c36d Improved counter peripheral documentation, and moved its documentation to the end
of the page just before the copyright notice.
2024-12-31 17:54:58 +01:00
sidney
f95a60d5ad Updating sim65 docs. 2024-12-31 13:48:45 +01:00
sidney
e37a2b1559 Updated documentation with counter documentation. 2024-12-31 13:35:16 +01:00
bbbradsmith
8804dc7a58 give cl65 alternative 2024-04-16 16:56:13 -04:00
bbbradsmith
4bc726ebe2 clarify the meaning of the exit code unsigned limitation 2024-04-16 16:41:00 -04:00
bbbradsmith
fa1a426c29 add -t sim6502 to cc65 and ca65 examples 2024-04-16 14:06:45 -04:00
bbbradsmith
89b709c7f8 make it clearer that explicit lib is required, note that exit is from stdlib.h, exit codes are unsigned, tweak "see below" for spacing, clarify that assembly can be used with C tests as well 2024-03-28 16:55:55 -04:00
bbbradsmith
79585194e6 provide simple examples for using sim65 with C and assembly code 2024-03-28 16:33:20 -04:00
Ryan Carsten Schmidt
913ab3607f Fix typo 2023-11-14 00:22:36 -06:00
bbbradsmith
2cb457b85f sim65 use error codes outside the simulated program's range for non-sim errors 2023-05-07 16:51:12 -04:00
bbbradsmith
7f0baff792 document how to return from assembly sim65 test 2023-05-07 16:35:05 -04:00
mrdudz
680f0c17f5 remove dangling spaces 2022-04-17 16:05:10 +02:00
bbbradsmith
5269552346 sim65 common define for paravirt hooks base location
allows the loaded binary to take up as much space as possible
restored some documentation of the hooks but without reference to specific location
2019-05-31 10:40:04 +02:00
Oliver Schmidt
6efb71bea7 Rearranged paravirt function vector.
- exit right below 6502 vectors.
- keep exit addr stable as it may be called from asm.
2019-05-30 00:10:17 +02:00
bbbradsmith
3612edf4fa sim65.sgml typo: bold is bf not ** 2019-05-29 22:56:51 +02:00
bbbradsmith
fb7d4acd5c versionable header for sim65
load and run address now configured from header
fix error codes not to conflict with test
fix test/misc/endless.c which is supposed to fail if an endless loop does not occur
2019-05-29 22:56:51 +02:00
bbbradsmith
2f3cae0d2e movable sp for sim65 2019-05-29 22:56:51 +02:00
Brad Smith
26d436b90d separating standard file I/O from low-level paravirtualization 2019-05-27 21:09:19 +02:00
Brad Smith
53bfd2e8cd added name 2019-05-27 21:09:19 +02:00
bbbradsmith
4acf011fa4 noting that standard file functions work as well
correcting target name
2019-05-27 21:09:19 +02:00
Brad Smith
42beb29f72 sim65.sgml syntax error unclosed tt 2019-05-27 21:09:19 +02:00
bbbradsmith
17505e2173 sim65.sgml noting sim65c02 target as well 2019-05-27 21:09:19 +02:00
bbbradsmith
69c7acb3bc some documentation for sim65 2019-05-27 21:09:19 +02:00
Christian Groessler
7445550831 remote TABs in doc/ and test/ 2019-02-12 22:50:49 +01:00
Greg King
a6b04f6e97 Changed most "backticks" (grave accents) into apostrophes.
Quotations that are embraced by tick marks now look better, in most fonts.
2019-01-05 14:57:12 -05:00
Oliver Schmidt
6cce110345 Adjusted URL to use https (and removed obsolete dates). 2018-09-20 12:45:15 +02:00
Christian Groessler
97b517a892 sim65: add command line parameter to print number of CPU cycles at exit 2016-07-05 17:07:39 +02:00
polluks
cb3700ef66 Changed stdout to stderr to separate sim65's output streams. Suggested doc edit. 2016-01-05 17:45:18 +01:00
polluks
231150bc3c Added sim65 documentation. 2016-01-05 15:45:51 +01:00