1
0
mirror of https://github.com/cc65/cc65.git synced 2025-04-20 06:37:56 +00:00

484 Commits

Author SHA1 Message Date
Oliver Schmidt
3edb959298 Finally made CONIO and STDIO fully interoperable in 80 column mode.
In order to avoid undefined behaviour of programs not aware of 80 column mode, the 80 column firmware deliberately doesn't use CH but OURCH. So in order to be fully interoperable, CONIO needs to do the same. This changes introduces that behavior. So far so good.
But the 80 column firmware can also be active in 40 column mode. This scenario is not detectable with reasonable effort. Therefore the behaviour of CONIO in this scenario is _not_ improved. However, this scenario is supposed to be very uncommon - and a recent update to videomode() makes sure to not activate it anymore ourselves.
Notes:
* If a program wants to be 100% sure to not run in 40 column mode with 80 column firmware active it can call videomode(VIDEOMODE_40COL) to explicitly deactivate a potentially active 80 column firmware. However, this always implicitly clears the screen.
* In 40 column mode (contrast to 80 column mode) the 80 column firmware updates CH to reflect OURCH. So as long as CONIO only reads CH, but doesn't update it, everything works as expected. Interestingly this makes a rather useful scenario of STDIO/CONIO interoperation work: Using STDIO for screen output and CONIO for keyboard input. When cgetc() is called after cursor(1), it has to write to the screen as there's no hardware cursor on the Apple II. Those writes work as expected even in 40 column mode with active 80 column firmware as CH is only read but not written.
2025-03-13 22:22:28 +01: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
Alex Thissen
489989f4c8 Changed 0x hex values to % binary values 2024-11-09 11:45:41 +01:00
Alex Thissen
336c4287c5 Missed some dangles spaces 2024-11-09 11:45:41 +01:00
Alex Thissen
abcb073a5a Bit definitions for Suzy 2024-11-09 11:45:41 +01:00
Alex Thissen
eb6003aaf7 Mikey enumeration values for cc65 include files and new bit definitions for ca65 2024-11-09 11:45:41 +01:00
rumbledethumps
e373aa2d3f
Merge branch 'cc65:master' into master 2024-09-29 18:36:34 -07:00
coronax
838c8b48b7 Set the clock id to CLOCK_REALTIME when calling clock_gettime.
Previously, time() allocated stack space for the clock id argument, but didn't actually set a value.
2024-09-07 23:27:54 -05:00
Bob Andrews
a372ead4de
Merge pull request #2334 from carlo-bramini/fix-sim65-1
[SIM65] Support undocumented opcodes for 6502
2024-03-10 00:37:18 +01:00
rumbledethumps
b8b263b38c
Merge branch 'cc65:master' into master 2024-02-17 14:54:12 -08:00
Alex Thissen
acff429eb8 Added redeye check for SER_HS_SW handshake 2024-02-11 15:33:22 +00:00
Alex Thissen
788ae82d30 Fixes to serial driver implementation 2024-02-10 23:19:02 +00:00
Carlo Bramini
b04d79b1da [SIM65] Support undocumented opcodes for 6502
This PR is mostly a complete rewrite of the emulator for 6502/65c02 opcodes.
It provides an easier to maintain implementation of the instructions, by using few macros rather than having hand-written code for each function.
All undocumented, previously missing opcodes for 6502 are also implemented.
The patch also includes a detailed documentation of those opcodes, for reference to developers.
This PR should fix one of the milestones listed here for the next version of CC65:

https://github.com/cc65/wiki/wiki/Before-the-next-release
2024-02-08 12:13:17 +01:00
rumbledethumps
7b790cf883 add RIA_OP_CLOCK to asm inc 2024-02-04 23:38:44 -08:00
jedeoric
bcea5dfa8f
fix comment telestrat 2024-01-05 00:46:15 +01:00
jedeoric
726b70a534
add XMAINARGS and XGETARGV for Telestrat 2024-01-05 00:45:03 +01:00
Colin Leroy-Mira
75461e1319 Apple2: implement stat(2) and statvfs(3) 2024-01-01 19:12:51 +01:00
Alex Thissen
66e354961c Missed some tabs 2023-12-29 22:48:36 +01:00
Alex Thissen
061d907a11 Fixed tabs instead of spaces 2023-12-29 22:46:15 +01:00
Alex Thissen
e5f9def572 Added SPRCTL0 and SPRCTL1 bit definitions for ca65 2023-12-29 22:37:18 +01:00
rumbledethumps
564c85235f style update and add rp6502 doc 2023-11-17 11:08:51 -08:00
rumbledethumps
b17c4d3434 add rp6502 target 2023-11-16 18:46:16 -08:00
mrdudz
6222cd9115 don't use a label in the bgt macro, as that may cause subtle problems. fixes #2222 2023-10-14 23:04:30 +02:00
MooingLemur
59941d9464 cx16: use KERNAL memsiz for MEMSIZE in asminc/cx16.inc 2023-06-15 21:30:26 -04:00
Jeff Tranter
3a5fbd34da Add KIM-1 functions to write to the 7-segment LED display and get
keypresses from the keypad.
Includes sample program illustrating how to use them.
Tested on real KIM-1 hardware.
2023-03-29 18:40:10 -04:00
Bob Andrews
d69117c0c1
Merge pull request #2037 from jefftranter/kim1-io-fixes
Fixes and improvements to KIM-1 i/o routines.
2023-03-29 22:41:34 +02:00
mooinglemur
2dd558eae9 cx16: update RAM constants for ROM ver R42 2023-03-28 21:18:02 -07:00
Jeff Tranter
806ffe5675 Fixes and improvements to KIM-1 i/o routines.
Tested on real KIM-1 hardware.

read.s:
- Remove commented out line.
- Remove unused check for bell character.
- Remove echo of newline (hardware always echoes entered characters).
- This fixes gets() and fgets() so they return when CR is entered.

write.s:
- Fix check for adding return after linefeed (failed to work because OUTCHR changes A)
- Remove unused check for bell character.

kim1.inc:
- Add symbol for monitor entry

crt0.s:
- Jump to KIM-1 monitor by address rather than using BRK (which relies on vector being set in RAM)
2023-03-27 17:56:25 -04:00
jede
c8c6fc6a40 add xfseek 2023-03-17 23:10:15 +01:00
Rutger van Bergen
ae23e47eb5
Merge branch 'cc65:master' into master 2022-12-26 13:57:10 +01:00
Rutger van Bergen
3b431d9fa3 Remove trailing whitespace 2022-09-19 23:57:26 +02:00
Rutger van Bergen
2b07204952
Merge branch 'cc65:master' into kim1 2022-09-19 20:03:23 +02:00
Rutger van Bergen
cb8cb876ec Add documentation, make capitalization uniform 2022-09-19 19:56:57 +02:00
mrdudz
b09024aa32 add extra underscore to heap stuff 2022-08-29 19:55:48 +02:00
mrdudz
5d390489a8 fix underscores in errno (and related) headers 2022-08-28 21:36:22 +02:00
mrdudz
f70020a2b8 use __sig_ign and __sig_dft instead of _sig_ign and _sig_dft 2022-08-28 20:18:34 +02:00
ZeroByteOrg
5608453aea Fixed YM2151 struct to match HW behavior 2022-08-08 16:16:37 -05:00
Dave Plummer
799aec23a6 Add KIM-1 Support 2022-06-04 13:00:48 -07:00
Bob Andrews
e0cc3650e4
Merge branch 'master' into missing-purple 2022-05-17 15:34:51 +02:00
Bob Andrews
b8f7167dcd
Merge pull request #1729 from jedeoric/fix_fd_cleaning_telestrat
[Telestrat] missing fd_management and cleaning
2022-05-04 02:34:58 +02:00
Greg King
a5e69e7ea6 Upgraded the cx16 library to the Commander X16 Kernal ROM's prerelease 39. 2022-04-29 16:56:54 -04:00
jede
8c26b837ef fix typo 2022-04-24 00:41:12 +02:00
jede
c48df98145 missing fd_management and cleaning 2022-04-24 00:39:04 +02:00
Karri Kaksonen
787d5c57ad
Merge branch 'cc65:master' into atari7800conio 2022-04-18 20:22:15 +03:00
mrdudz
ece6f10588 remove dangling spaces
when changing the checker scripts and/or directly comitting to git head, please make sure to also run the checks first so you don't break the autobuilds
2022-04-18 17:43:56 +02:00
Karri Kaksonen
6a6aa094fa
Merge branch 'cc65:master' into atari7800conio 2022-04-18 12:40:18 +03:00
Karri Kaksonen
45c4f7d46f Add mono conio files 2022-04-18 11:59:54 +03:00
mrdudz
bfb8568a5f remove dangling spaces 2022-04-17 16:04:58 +02:00
Karri Kaksonen
ce4d1e0e54 Remove obsolete file and fix tabs 2022-04-16 21:21:27 +03:00
Karri Kaksonen
77b300682a Add basic conio buffer 2022-04-02 09:39:46 +03:00