0 Members and 2 Guests are viewing this topic.
Yet another member owns a commodore 64 now. I found a whole stack of commodore stuff in a thriftshop including 3 disk drives, 2 cartridges, a datasette and ofc. a commodore 64. aeTIos came over to my place today and came to pick it up. Expect more software to be released soon!Left: me, right: aeTIos.
And I'm not that good at 6502 assembly yet. The most complex thing I made so far is a sprite which you can move using the joystick.
setup=*seilda #<intcodesta 788lda #>intcodesta 789clirtsintcode=*inc $d020jmp $ea31
78 A9 0D 8D 14 03 A9 108D 15 03 58 60 EE 20 D04C 31 EA
A9 01 85 FB A9 06 8D 03 DD A9 02 8D 01 DD A2 08 A9 00 8D 01 DD 06 02 AD 01 DD A0 04 8C 01 DD 25 FB 05 02 85 02 A0 00 8C 01 DD CA D0 E8 60
// Draw blocks on screen// Author: Koen van Vliet// Date: 12 Jul 2014// // Notes:// * Use kickassembler to assemble//=================================================// B A S I C S Y S ()//=================================================.pc =$0801 "Basic Upstart Program":BasicUpstart(main)//=================================================// M A I N//=================================================.pc = $0820main: jsr $E544 // Kernal routine: Clear screen sei // Disable interrupts // Black block :fillBlock($0400,4,16,10,6,35) :fillBlock($D800,4,16,10,6,0) // Green block :fillBlock($0400,11,1,18,23,224) :fillBlock($D800,11,1,18,23,13) // White block :fillBlock($0400,16,6,20,6,0) :fillBlock($D800,16,6,20,6,1) cli // Enable interrupts rts // Return to Basic//=================================================// M A C R O 'S//=================================================// Routine: fillBlock// Fills a rectangular block in memory with one value.macro fillBlock(base,col,row,w,h,val){ .const addr = base + 40 * row + col - 1 lda #<addr // Set up parameters sta mod_b_addr + 1 lda #>addr sta mod_b_addr + 2 lda #w sta mod_b_w + 1 lda #h sta mod_b_h + 1 lda #val sta mod_b_v + 1 jsr fill_block // Draw a block on screen}//=================================================// R O U T I N E S//=================================================// Routine: fill block// Fills a rectangular block in memory with one value//// Input: Modify parameters by modifying operands.// Preferably use the macro for this// Output: -// Notes:// * Intended for filling blocks in screen/color ram. // Assumes 40 bytes per row.// * Does not clip outside of screen area.fill_block: mod_b_h: ldy #$08 // Operand is modified by program.loop_row: // Default value given to make this mod_b_w: ldx #$08 // Operand is modified by program.loop_col: mod_b_v: lda #224 // Fill block with single value. mod_b_addr: // Operand is modified by program. sta $FFFF,x // Write character to screen. Operand is dex // modified by program. bne loop_col clc lda #40 adc mod_b_addr + 1 // Modify operand low byte sta mod_b_addr + 1 lda #0 adc mod_b_addr + 2 // Modify operand high byte sta mod_b_addr + 2 dey bne loop_row rts