1
0
mirror of https://github.com/cc65/cc65.git synced 2024-07-09 01:28:58 +00:00
Commit Graph

2927 Commits

Author SHA1 Message Date
jede
848df36f6b Optimize Clrscr 2019-07-21 14:11:51 -04:00
jede
0fe98a7ca8 Fix bgcolor and textcolor must return last color, jmp remove. 2019-07-21 14:11:51 -04:00
jede
f9e13abc11 jmp instead of jsr 2019-07-21 14:11:51 -04:00
jede
ede64f68a9 Fix bug with bgcolor and textcolor 2019-07-21 14:11:51 -04:00
jede
6f7f6b5119 Fix label, optimize code 2019-07-21 14:11:51 -04:00
jede
a0a6537bda Fix typo and optimize 2019-07-21 14:11:51 -04:00
jede
28eba8bff9 fix import 2019-07-21 14:11:51 -04:00
jede
7767a0e88e fix typo 2019-07-21 14:11:51 -04:00
jede
3d5811d8f5 Fix gotoy changecolor 2019-07-21 14:11:51 -04:00
jede
7f9e73a1ce Add textcolor and bgcolor.s 2019-07-21 14:11:51 -04:00
jede
14ac1a7ff6 Fix bug : gotoxy does not working because Y does not update the adress on the screen 2019-07-21 14:11:51 -04:00
Björn Esser
93b6efcb2f zlib: Use correct (un)signedness of char in prototypes and functions.
Also ensure we are using the same constness qualifiers.
2019-06-19 19:01:30 +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
Oliver Schmidt
c6bbea0bb0 Renamed program start label. 2019-05-30 00:06:31 +02:00
bbbradsmith
9fcd91ebe9 sim65 header comment fix 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
Oliver Schmidt
ac0b452834 Added '_' prefix to sin and cos.
Users complained that otherwise the names might clash with their functions.
2019-04-13 11:25:54 +02:00
Christian Groessler
03311e7268 atari5200: update docs for recent conio changes
also renames libsrc/atari5200/extra/conioscreen_20x12.s to
libsrc/atari5200/extra/conioscreen-20x12.s to be in line with
other optional link modules
2019-04-13 11:07:06 +02:00
Christian Groessler
78daf84f12 atari5200: name conio constructor 'initconio' 2019-04-12 12:49:38 +02:00
Christian Groessler
e1e6bec9ff atari5200: changes from discussions in #870
- rename screen_setup to initconio
- use Greg King's version of bgcolor()
2019-04-12 12:49:38 +02:00
Christian Groessler
d7eecb57f8 atari5200: get rid of conio_colors table
use system color variables instead; improve testcode/lib/atari5200/hello.c
test program
2019-04-12 12:49:38 +02:00
Christian Groessler
be6bba66a9 atari5200: conio now uses just four colors altogether
See discussion in PR #870.
2019-04-12 12:49:38 +02:00
Christian Groessler
79b9a8d2df atari5200: add screensize function 2019-04-12 12:49:38 +02:00
Christian Groessler
db01036e2e atari5200: add alternative conio screen (20x12 resolution) 2019-04-12 12:49:38 +02:00
Christian Groessler
ec5e38617a atari5200: implement bgcolor() and textcolor()
Includes some other small fixes/cleanups.
2019-04-12 12:49:38 +02:00
Christian Groessler
edd596b2a4 atari: split color.s into bordercolor.s and bgcolor.s 2019-04-12 12:49:38 +02:00
Oliver Schmidt
fc6a63a15e Avoid unintended file "shadowing".
3d8c3a4948 caused an unintended "shadowing" of files in /libsrc/runtime by files in /libsrc/common. Therefore the files in question are renamed (again) in /libsrc/common to make the files in /libsrc/runtime "visible" again.
2019-04-04 09:16:59 +02:00
IrgendwerA8
3d8c3a4948 Code review adaptations, removed "cc65_" prefix from functions 2019-03-29 22:53:04 +01:00
IrgendwerA8
db8bd84a82 Changes due to code review. 2019-03-29 22:53:04 +01:00
IrgendwerA8
399250a105 Optimized mul20 & mul40 and extracted to new library. 2019-03-29 22:53:04 +01:00
Bas Wassink
96d0b00a76 Merge https://github.com/cc65/cc65
Pull to fix extra changes in PR #863
2019-03-24 20:49:53 +01:00
Bas Wassink
2eac69a943 Remove trailings spaces from CBM-related asm files 2019-03-22 22:54:05 +01:00
IrgendwerA8
e1a4910580 Code review changes and build fix. 2019-03-04 23:32:56 +01:00
IrgendwerA8
cc6559c3f6 Minor math optimizations 2019-02-28 19:48:29 +01:00
Daniel Serpell
258ba05660 Separate header and trailers of Atari system_check chunk.
This allows to omit the headers and trailers if needed.
2019-02-21 19:00:17 -03:00
Oliver Schmidt
b9ea77b185
Merge pull request #834 from jedeoric/master
Update telestrat target doc, add tgi_clear support for telestrat target, stratsed & telemon 2.4 vars added
2019-02-12 17:51:24 +01:00
Christian Groessler
58484449b4 remove TABs 2019-02-05 23:27:52 +01:00
Christian Groessler
055c294ac0 Use Timer2 for mouse polling.
This follows a suggestion by Sijmen Schouten in issue #818.
Platoterm64 now works with mouse at 1200 baud.

Bump MOUSE_API_VERSION in asminc/mouse-kernel.inc.

Fix typo in testcode/lib/mouse-test.c.
2019-01-29 22:00:55 +01:00
jedeoric
63e64f801a
Merge branch 'master' into master 2019-01-25 10:15:21 +01:00
Piotr Fusik
7a034f505b Comment the ATASCII to screen code conversion. 2019-01-23 19:02:26 +01:00
Piotr Fusik
1781a5cfe7 Optimize the conversions from Atari ASCII to screen codes. 2019-01-23 00:05:31 +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
Scott Hutter
a6725edb15 moved to better folder location 2018-12-30 18:57:46 +01:00
Scott Hutter
9160b8ddc2 Issue 814 2018-12-30 18:57:46 +01:00
Scott Hutter
2f6f468aad Added SetNewMode() to geoslib - #814 2018-12-30 18:57:46 +01:00
Paul Gardner-Stephen
1b46dfe820 change reference to $0200FF to $0200xx 2018-12-30 03:49:26 -05:00
Paul Gardner-Stephen
576d64da38 remove redundant line 2018-12-30 03:49:26 -05:00
Paul Gardner-Stephen
837b9b3c2c use pre-existing ZP storage. Make 32-bit pointer value loading more self-evident 2018-12-30 03:49:26 -05:00
Paul Gardner-Stephen
19ca1f6b48 add support for detecting 45GS02 2018-12-30 03:49:26 -05:00
jede
d707ef4c72 Now tgi_clear() works 2018-12-10 21:48:09 +01:00
Olli Savia
b6529225e9 Added SER_ prefix. Whitespace cleanup 2018-11-26 22:14:31 +01:00
Olli Savia
b269b3f5b2 Added SER_ prefix. Whitespace cleanup 2018-11-26 22:14:31 +01:00
Olli Savia
b9054ec9a7 Added SER_ prefix. Whitespace cleanup 2018-11-26 22:14:31 +01:00
Olli Savia
4304f11549 Added SER_ prefix. Whitespace cleanup 2018-11-26 22:14:31 +01:00
Olli Savia
7147e780e6 Added SER_ prefix. Whitespace cleanup 2018-11-26 22:14:31 +01:00
Olli Savia
5901ea80a4 Added SER_ prefix. Whitespace cleanup 2018-11-26 22:14:31 +01:00
Olli Savia
ad0b0982d0 Added SER_ prefix 2018-11-26 22:14:31 +01:00
Olli Savia
7b4807a8f7 Changed prefix SWL_ to SER_ 2018-11-26 22:14:31 +01:00
Olli Savia
aeff90ca90 Updated to use cbm_kernal.inc. Whitespace cleanups 2018-11-26 22:14:31 +01:00
IrgendwerA8
923fa8fc93 Saved 2 bytes and fixed error in case of negative result. 2018-11-09 17:27:35 -05:00
Oliver Schmidt
40f42e977f Adjusted comments to match actual prototypes. 2018-11-06 11:13:23 +01:00
Greg King
c2568d804d Fixed the Plus4's serial driver's ACIA address. 2018-10-23 19:52:23 -04:00
jede
385260e453 Fix comments and TELEMON uppercase 2018-10-19 23:43:40 +02:00
jede
6a18ad5fbf Clean wherey.s 2018-10-19 23:43:40 +02:00
jede
ee7514fea2 Remove BASHEAD segment which is not useful 2018-10-19 23:43:40 +02:00
Christian Groessler
df3c43bede Atari: implement clock_getres() 2018-09-28 09:47:20 +02:00
Christian Groessler
6dc7309e50 Atari: add support for BW-DOS. Initially contributed by Daniel Serpell. 2018-09-27 17:37:59 +02:00
Christian Groessler
9c7cccf3e5 Atari: clock_gettime() and clock_settime() implementations
They are using SpartaDOS-X interfaces and are therefore only working
in this environment.
2018-09-25 21:11:05 +02:00
Christian Groessler
118bc996fb libsrc/atari/getdefdev.s: small comment change 2018-09-20 23:58:23 +02:00
Christian Groessler
d52d986aca libsrc/atari/getdefdev.s: small optimization and fix a typo 2018-09-14 16:54:20 +02:00
Christian Groessler
4691974466 Atari: Make a good "default device" on AtariDOS (2.0 and 2.5) and MyDOS.
The default device will be the one the program was loaded from instead of
always D1:.
2018-09-13 22:33:54 +02:00
Christian Groessler
08d164a811 fix comment in last change 2018-09-12 01:20:12 +02:00
Christian Groessler
e4e3dbf756 atarixl: check at startup whether RAM beneath the ROM is in use
If detected, the program refuses to run, preventing a crash.
The check only works with SpartaDOS. I don't have an overview which
DOSes potentially use the RAM under the ROM. Or which other installed
programs might use it.

No additional runtime memory space is consumed, since the change
is in the "system check" load chunk which gets replaced by the
user program during loading.
2018-09-12 01:05:52 +02:00
Oliver Schmidt
a9a102b0e8 Protect random counter against ProDOS.
Although documented nowhere (!!!) ProDOS trashes the random counter locations $4E/$4F. Is discovered this because my TCP connections didn't have random local ports.

It's a really funny coincidence that David Finnigan discovered only 3 years ago the very same issue because of the very same reason: https://groups.google.com/forum/#!topic/comp.sys.apple2.programmer/1ciep_Oetvo
2018-09-08 23:29:59 +02:00
Oliver Schmidt
cddc4da3bb Just removed some trailing spaces. 2018-09-08 23:14:54 +02:00
Oliver Schmidt
73faf60fe0 Support randomize().
In order to have randomize() work as expected (and the Apple II random number generation in general) it is necessary to update the random counter during keypress wait just like the ROM function does.
2018-09-08 18:45:20 +02:00
Christian Groessler
b6ccd4d5d4 Atari: RealDOS adaptations
RealDOS is a SpartaDOS clone. Handle it the same way as SpartaDOS.
2018-09-06 15:55:07 +02:00
Christian Groessler
e9b8f5d814 Atari: Add detection of RealDOS (http://www.realdos.net/realdos.html). 2018-09-06 12:08:50 +02:00
Christian Groessler
1cc4fa9356 Atari: fix interrupt handling if extended memory is banked in
Extendend memory is mapped over the main memory in the 0x4000..0x7FFF
area. Many DOSes disable interrupts while extended memory is banked in,
but not all (e.g. SpartaDOS-X).
This change modifies the initial interrupt handler to map in main memory
before chaining to the "worker" handlers.
Since the initial interrupt handler uses a data segment to store the
trampoline to chain to the original handler, introduce a new "LOWBSS"
segment to hold this trampoline. Otherwise the trampoline may end up
inside the 0x4000..0x7FFF area.

Add a link time warning if "LOWCODE" segment lays within the extended
memory window.
2018-09-05 11:28:15 +02:00
Christian Groessler
d199ca1460 Atari, Atari5200: disable "attract mode" on mouse or joystick input
Fixes #736.
2018-09-05 11:23:12 +02:00
Oliver Schmidt
70a131e09a Just a minor comment improvement. 2018-09-02 23:07:26 +02:00
Greg King
39694d0aaa Fixed bugs; and, improved the efficiency of some pce library functions. 2018-08-30 11:48:46 +02:00
Greg King
959eff34a3 Fixed and improved some pce comments. 2018-08-30 11:48:46 +02:00
Greg King
2cc822b44e Fixed some mistakes (mostly in the documentation). 2018-08-30 11:48:46 +02:00
Greg King
b5d939c858 Style changes. 2018-08-30 11:48:46 +02:00
Greg King
203200e259 Used I/O mirror locations that avoid (redirected) zero-page accesses. 2018-08-30 11:48:46 +02:00
Greg King
f2d2f3c193 Moved the NES font into its own object module.
It can be replaced by a custom font when a program is built.
2018-08-29 12:13:58 -04:00
greg-king5
a08192b53e
Merge pull request #706 from xlar54/master
* tgi driver for c128 VIC-II

* Made the VIC-IIe TGI driver put its bitmap behind the ROMs.

* c128-hi.tgi doc
2018-08-29 10:34:05 -04:00
Christian Groessler
2d4210b309 Atari5200 joystick driver: enable POT input.
The "Atari800" emulator doesn't emulate this aspect, therefore the problem
wasn't noticed before.
2018-08-24 17:04:31 +02:00
Stefan
f3ef819b43 Update crt0.s 2018-08-21 12:21:56 +02:00
Stefan
3ae5161636 CMOS optimisation 3rd
"The decimal flag D is cleared" [...]
http://shu.emuunlim.com/download/pcedocs/pce_cpu.html
2018-08-21 12:21:56 +02:00
Stefan
199226d089 Update irq.s 2018-08-20 22:31:08 +02:00
Stefan
e335b50ed1 CMOS optimisation
The Lynx CPU always cleared the flag.
2018-08-20 22:30:41 +02:00
Patrick Pelletier
b37d0a444c lseek: Return EINVAL if new position is less than 0 or greater than 2^24 - 1.
Also, implemented @greg-king5's suggestion to save a byte on error paths.
2018-08-20 22:24:48 +02:00
Patrick Pelletier
59a4ab8778 lseek: Implement additional feedback from PR #723.
* Check CPU_ISET_65SC02 rather than APPLE2ENH.
* Set sreg and sreg+1 to $FF on error, to return -1 as a long.
2018-08-20 22:24:48 +02:00
Patrick Pelletier
8cb930b50e lseek: use STZ for APPLE2ENH
(As suggested in pull request.)
2018-08-20 22:24:48 +02:00
Patrick Pelletier
68a115cacf Fix ftell() on Apple II to return the correct value.
Fixes this issue:
https://github.com/cc65/cc65/issues/722

ftell() returns the value returned by lseek(), and lseek() for the
Apple II wasn't returning a value.
2018-08-20 22:24:48 +02:00
Oliver Schmidt
1644bcdf03 Implemented line wrap.
According to https://github.com/cc65/wiki/wiki/Direct-console-IO it is undefined what happens when the end of the sceen is reached. But it is _not_ undefined what happens when the end of the line is reached. So implement the usual thing - which was easy enough to do after all.
2018-08-20 00:30:17 +02:00
Oliver Schmidt
f8c6c58373 Made Apple II CONIO more flexible.
Originally the Apple II had a 64 char set and used the upper two bits to control inverse and blinking. The Apple //e brought then an alternate char set without blinking but more individual chars. However, it does _not_ contain 128 chars and use the upper bit to control inverse as one would assume. Rather it contains more than 128 chars - the MouseText chars. And because Apple wanted to provide as much backward compatibility as possible with the original char set, the alternate char set has a rather weird layout for chars > 128 with the inverse lowercase chars _not_ at (normal lowercase char + 128).

So far the Apple II CONIO implementation mapped chars 128-255 to chars 0-127 (with the exception of \r and \n). It made use of alternate chars > 128 transparently for the user via reverse(1). The user didn't have direct access to the MouseText chars, they were only used interally for things like chline() and cvline().

Now the mapping of chars 128-255 to 0-127 is removed. Using chars > 128 gives the user direct access to the "raw" alternate chars > 128. This especially give the use direct access to the MouseText chars. But this clashes with the exsisting (and still desirable) revers(1) logic. Combining reverse(1) with chars > 128 just doesn't result in anything usable!

What motivated this change? When I worked on the VT100 line drawing support for Telnet65 on the Apple //e (not using CONIO at all) I finally understood how MouseText is intended to be used to draw arbitrary grids with just three chars: A special "L" type char, the underscore and a vertical bar at the left side of the char box. I notice that with those chars it is possible to follow the CONIO approach to boxes and grids: Combining chline()/cvline() with special CH_... char constants for edges and intersections.

But in order to actually do so I needed to be able to define CH_... constants that when fed into the ordinary cputc() pipeline end up as MouseText chars. The obvious approach was to allow chars > 128 to directly access MouseText chars :-)

Now that the native CONIO box/grid approach works I deleted the Apple //e proprietary textframe() function that I added as replacement quite some years ago.

Again: Please note that chline()/cvline() and the CH... constants don't work with reverse(1)!
2018-08-20 00:30:17 +02:00