Commit Graph

78 Commits (newintro)

Author SHA1 Message Date
giomba 299eee1257 Reorganized memory
Now program takes less space in RAM.
All variables, costants and Lists are moved before the SID song,
in a previously unused space (BASIC RAM).
SID song edit has been changed:
	- same song but slightly different
	- takes up a bit less than 4k
	- more catchy :-)
	- perfectly fits in $1000-$2000 and allows...
...the new custom charset to be put at $2000!
	- Taken TGGS font and properly customized with tiles
Now actual program starts at $2800.

Also added some useful code for assembler to output debug infos when
assembling with -DDEBUG=1

In the meanwhile discovered tremendous subtle bug due to uninitialized
structure (listX and listY). Fixed.

Memory map now is:
	+-------------------------------+
0000	| things in zero page		|
	|	and low RAM		|
	+-------------------------------+
0800	| BASIC autostart		|
	| then data (variables,		|
	|	costants and strings)	|	<-- this can be done better using segments. Reminder for the future.
	|				|
	+-------------------------------+
0E00	| listX				|
	+-------------------------------+
0F00	| listY				|
	+-------------------------------+
1000	| SID song			|
	|				|
	|				|
	+-------------------------------+
2000	| TGGS Custom font charset	|
	|				|
	+-------------------------------+
2800	| ACTUAL CODE			|
	|				|	<-- plus some garbage data, see above (segments TODO)
	.				.
	.				.
2018-09-10 21:39:53 +02:00
giomba 70b041cf14 Improved graphics
- Added multicolor graphic mode with custom charset, for text and tiles
- Added some debug options in Makefile

NOTE: code is functioning and correct, but really needs a big cleanup a
logical reorganization!
2018-09-10 15:41:12 +02:00
giomba 0932566285 Edit status bar text
- Removed debug infos (commented out)
- Added score label
2018-09-05 23:10:55 +02:00
giomba a1382611bc Joystick support (port#2) 2018-09-05 22:53:18 +02:00
giomba a15c924d53 Added skeleton for multiplatform development
Just added some preprocessor instructions and some sample code to show
how to use them. This should be useful for the future port on C16.
2018-09-05 22:03:20 +02:00
giomba 78ac2fffa9 Jammed my email address, since I don't want spam 2017-12-27 18:29:24 +01:00
giomba 3ce810a482 Conscious use of assembler pre-processor directives, to avoid use of magic numbers and memory locations for costants 2017-12-27 18:26:44 +01:00
giomba e177fdcd86 Added techniques of good software engineering - well, use of costants instead of magic numbers for statuses, sort of enum 2017-12-27 18:12:18 +01:00
giomba be1c1f57f5 Added outro delay 2017-12-27 18:01:37 +01:00
giomba ceeea2deb8 Added a lot of useful comments to document this code for future reviews, for future me, and for other mads who still code for the 6502 inside a CBM64 2017-12-24 17:26:33 +01:00
giomba 3c296c9c19 Added copyright 2018; Added reset button 2017-12-24 16:44:50 +01:00
giomba c81b92c960 Improved intro.
Improved introPrint.

Adjusted gameover routine to work with the new intro.
This needs to be further improved anyway to give a sensible delay before
clearing the screen (to allow player to see her/his score)
2017-12-24 15:57:37 +01:00
giomba 1d7226df45 Reorganized code with statuses, to introduce an intro scene.
Added routine to print text during intro; things needs to be developed.
2017-12-24 14:17:37 +01:00
giomba 7d8233fde2 Removed debug random value 2017-12-22 17:24:35 +01:00
giomba 14952319dd Added simple intro layout 2017-12-22 17:23:58 +01:00
giomba d28e93f54e Added reversed colors in status bar, to improve visual 2017-12-22 16:47:06 +01:00
giomba 0abfb0c345 The same as before, but I am a stupid, I forgot the comment 2017-12-22 16:37:15 +01:00
giomba e91f86c50b Added BASIC autostart 2017-12-22 16:36:07 +01:00
giomba 207cbfd3cf That old X,Y coordinates generation using that ugly way was a real sh*t.
Now it is ways better (it simply does `random number` modulo `screen rows`
- or columns, depends).

There also was an error in comparing snakeX,Y with new piece of food's X,Y
Now really fixed (I hope, at least, since the bug is terribly difficult to
reproduce)

Also improved printing routine: now it can print general hexadecimal numbers,
and can locate them everywhere across first line (and beyond also, since it
is not checked, but if you do, you are a moron). Simply put byte to be print
in accumulator, column in Y index, and then jsr.
2017-12-22 16:21:19 +01:00
giomba 61a1c140f4 Probably fixed rare bug:
the pseudo-random routine pseudo-randomly generated X,Y for new piece of food
that corresponded to immediately next snake head position.
This X,Y resulted empty when checked in the routine, but suddenly after it
is overwritten with snake head, so food simply disappears.
This leads to impossible game play, because no new pieces of food are
generated if no food is previously eaten, but there is no food to eat, so...
Hope to have fixed.
2017-12-22 12:30:42 +01:00
giomba 53b3e700ca Updated comments on eat-food and self-eat detection 2017-12-22 12:14:37 +01:00
giomba e479dcb5fe Increased waiting time before reset after gameover 2017-12-21 17:31:53 +01:00
giomba f528c5f22a Added pause feature 2017-12-21 17:28:20 +01:00
giomba 23343d93f3 Visual improvements on status bar (score, messages) 2017-12-21 17:12:50 +01:00
giomba 3c91f4f8d6 Added support for ASCII spaces in printing function 2017-12-21 17:03:37 +01:00
giomba 6bb4a5151a Added routine for full reset of the game 2017-12-21 17:00:45 +01:00
giomba 95ae7e2ab4 Added reset after gameover, with a little delay 2017-12-21 16:49:05 +01:00
giomba c13a54c266 First commit 2017-12-21 15:14:42 +01:00