yuppicide Posted August 11, 2009 Share Posted August 11, 2009 (edited) Is there a "Hello World" type demo for 2600 ASM? I am really just looking for a way to randomly display blocks of text.. like paragraphs on the screen. Once it displays pressing the fire button would make a new one display. I would do something in bAtari Basic since I can draw playfields easily, but I'd like more text than that way is able to display. Edited August 11, 2009 by yuppicide Quote Link to comment Share on other sites More sharing options...
Nukey Shay Posted August 11, 2009 Share Posted August 11, 2009 How about the TIA Painter's demos? The asymmetrical one would be easy to alter into block letters for a message. To save romspace, you can use an imbedded loop when drawing the playfield (so that each line of data is repeated ~n times). Here's an example that does that (replace the lines in the asymmetrical source code): ;////////////// Start To Draw Playfield /////////////////////////////// LDY #23 ;2 @64 set 24 lines Draw_Picture_Loop: LDX #7 ;2 @62 set 8 scanlines for each pixel Block_Pixels_Loop: LDA (pf0_vector),Y ;5 @67 load PF0 before the scanline... STA WSYNC ;3 STA PF0 ;3 @3 LDA (pf1_vector),Y ;5 @8 STA PF1 ;3 @11 LDA (pf2_vector),Y ;5 @16 STA PF2 ;3 @19 LDA (pf0_vector),Y ;5 @24 load PF0 before the scanline... ASL ;2 @26 so there's time to reuse ROM ASL ;2 @28 ASL ;2 @30 ASL ;2 @32 STA PF0 ;3 @35 LDA (pf4_vector),Y ;5 @40 STA PF1 ;3 @43 LDA (pf5_vector),Y ;5 @48 STA PF2 ;3 @51 DEX ;2 @53 BPL Block_Pixels_Loop;2 @55 DEY ;2 @57 BPL Draw_Picture_Loop;2 @59 ;////////////// End Of Display //////////////////////////////////////// 24 lines at 8 pixels high each = 192 scanlines...that would be sufficient for smallish messages...10 letters across (3 point + a blank space) by 4 rows (5-point) with a blank row after each. Fudge the numbers around a bit if you want more rows. You could also use a pixel-height variable and number-or-rows variable if you want that to be adjustable for stuff that needs more lines than others...just use those instead of the immediate values in the first couple lines. There's 6 cycles to spare before the WSYNC, so it's safe. Before executing the kernel, set aside a group of 5 vectors (pf0_vector, etc) and store the LSB/MSB of your data tables to them. Indirect-Y addressing does the rest. Quote Link to comment Share on other sites More sharing options...
Nukey Shay Posted August 11, 2009 Share Posted August 11, 2009 BTW PF0 only requires the upper nybble. The routine above saves space by reusing the same bytes to hold PF3 in the lower nybble. That saves 1/6 table space and eliminates the need for a 6th vector. Quote Link to comment Share on other sites More sharing options...
yuppicide Posted August 11, 2009 Author Share Posted August 11, 2009 I've been to his website before, but never seen that page.. only other parts.. some nice demos on there. I'm going to read over them when I get out of work thanks. Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted August 11, 2009 Share Posted August 11, 2009 Look for "How to draw a playfield" Quote Link to comment Share on other sites More sharing options...
yuppicide Posted August 13, 2009 Author Share Posted August 13, 2009 I'm going to fool around this weekend. Basically I want a program to show randomly generated quotes. I won't say what exactly as I'd like to keep that under wraps until I actually make it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.