Friday, September 20, 2019

VIC20-ASM-006 Move a Character on Screen (right-to-left)


slot the VICMON cartridge into your VIC20
start VICMON by entering: SYS 24576


  1. We want to accomplish the following:start program at 1400 and load 0th row coordinate (#$00) into the X register
  2. load the column coordinate of the right-most screen border (#$15) into the Y register
  3. load the clear screen character ($93) into the accumulator
  4. run subroutine  ($FFD2) to output the clear screen character ($93) from the accumulator
  5. load $#00 into the accumulator to ensure all bits are turned off (this will make 6 set position instead of get)
  6. call the set cursor location (Plot) subroutine at address $FFF0
  7. load the value for letter W (#$57) into the accumulator
  8. run subroutine ($FFD2) to output the W character (#$57) from the accumulator to screen
  9. compare the value in the Y register with the left-most column coordinate (#$00)
  10. if the comparison was true, then jump to the end of the program (point 13)
  11. otherwise decrement the value in the Y register (DEY)
  12. loop back to clear the screen (point 3)
  13. end the program

test the program from VICMON by entering: .G 1400

the result will be the W character moving from right to left.

congratulations!

Thursday, September 19, 2019

VIC20-ASM-005 Move a Character on Screen (left-to-right)


slot the VICMON cartridge into your VIC20
start VICMON by entering: SYS 24576


  1. We want to accomplish the following:start program at 1400 and load 0th row coordinate (#$00) into the X register
  2. load the column coordinate of the left-most screen border (#$00) into the Y register
  3. load the clear screen character ($93) into the accumulator
  4. run subroutine  ($FFD2) to output the clear screen character ($93) from the accumulator
  5. load $#00 into the accumulator to ensure all bits are turned off (this will make 6 set position instead of get)
  6. call the set cursor location (Plot) subroutine at address $FFF0
  7. load the value for letter W (#$57) into the accumulator
  8. run subroutine ($FFD2) to output the W character (#$57) from the accumulator to screen
  9. compare the value in the Y register with the right-most column coordinate (#$15)
  10. if the comparison was true, then jump to the end of the program (point 13)
  11. otherwise increment the value in the Y register (INY)
  12. loop back to clear the screen (point 3)
  13. end the program

test the program from VICMON by entering: .G 1400

the result will be the W characters moving from left to right.

congratulations!

Thursday, September 12, 2019

VIC20-ASM-004 Print Line of Characters on Screen


slot the VICMON cartridge into your VIC20
start VICMON by entering: SYS 24576



We want to accomplish the following:
  1. start program at 1400 and load 0th row coordinate (#$00) into the X register 
  2. load the column coordinate of the left-most screen border (#$00) into the Y register
  3. load $#00 into the accumulator to ensure all bits are turned off (this will make 4 set position instead of get)
  4. call the set cursor location (Plot) subroutine at address $FFF0
  5. load the value for letter W (#$57) into the accumulator
  6. run subroutine ($FFD2) to output the W character (#$57) from the accumulator to screen
  7. compare the value in the Y register with the right-most column coordinate (#$15)
  8. if the comparison was true, then jump to the end of the program (point 11)
  9. otherwise increment the value in the Y register
  10. loop back to load $#00 into the accumulator (point 3)
  11. end the program

test the program from VICMON by entering: .G 1400

the result will be an entire line of W characters from left to right.

congratulations!

Tuesday, September 10, 2019

VIC20-ASM-003 Print Character on Screen


slot the VICMON cartridge into your VIC20
start VICMON by entering: SYS 24576



We want to accomplish the following:
  • start program at 1400 and load the row coordinate of the lower screen border (#$16) into the X register 
  • load the column coordinate of the right-most screen border (#$15) into the Y register
  • call the set cursor location (Plot) subroutine at address $FFF0
  • load the value for letter W (#$57) into the accumulator
  • run subroutine ($FFD2) to output the W character (#$57) from the accumulator to screen
  • end the program


test the program from VICMON by entering: .G 1400

the result will be a W character in the lower-right corner of the screen. As VICMON updates, the W character will scroll upwards by 5 rows.

you can now play with other coordinates and other characters.

Monday, September 9, 2019

VIC20-ASM-002 Screen Color


slot the VICMON cartridge into your VIC20
start VICMON by entering: SYS 24576



We want to accomplish the following:

  • start program at 1400 and load the screen and border color combination for green and purple ($5C) into the accumulator
  • set the screen color memory location ($900F) to the value in accumulator
  • end the program


.A 1400 LDA #$5C
.A 1402 STA $900F
.A 1405 BRK
.A 1406




test the program from VICMON by entering: .G 1400

the display will change colors, with the screen green and the border purple

place a clean cassette into the datasette
save the program to tape by entering: .S "SCREENCOLOR",01,1400,1406

press record & play on the datasette as required

now the program is saved for later use.

you can try this other color combinations

 SCREEN     |                             BORDER
------------|--------------------------------------------------------------------
            | black  | white |  red  | cyan |  purple |  green |  blue  | yellow
black       |  $08   |  $09  |  $0A  |  $0B |   $0C   |   $0D  |  $0E   |  $0F   
white       |  $18   |  $19  |  $1A  |  $1B |   $1C   |   $1D  |  $1E   |  $1F   
red         |  $28   |  $29  |  $2A  |  $2B |   $2C   |   $2D  |  $2E   |  $2F   
cyan        |  $38   |  $39  |  $3A  |  $3B |   $3C   |   $3D  |  $3E   |  $3F   
purple      |  $48   |  $49  |  $4A  |  $4B |   $4C   |   $4D  |  $4E   |  $4F   
green       |  $58   |  $59  |  $5A  |  $5B |   $5C   |   $5D  |  $5E   |  $5F   
blue        |  $68   |  $69  |  $6A  |  $6B |   $6C   |   $6D  |  $6E   |  $6F   
yellow      |  $78   |  $79  |  $7A  |  $7B |   $7C   |   $7D  |  $7E   |  $7F   
orange      |  $88   |  $89  |  $8A  |  $8B |   $8C   |   $8D  |  $8E   |  $8F   
lt. orange  |  $98   |  $99  |  $9A  |  $9B |   $9C   |   $9D  |  $9E   |  $9F   
pink        |  $A8   |  $A9  |  $AA  |  $AB |   $AC   |   $AD  |  $AE   |  $AF   
lt. cyan    |  $B8   |  $B9  |  $BA  |  $BB |   $BC   |   $BD  |  $BE   |  $BF   
lt. purple  |  $C8   |  $C9  |  $CA  |  $CB |   $CC   |   $CD  |  $CE   |  $CF   
lt. green   |  $D8   |  $D9  |  $DA  |  $DB |   $DC   |   $DD  |  $DE   |  $DF   
lt. blue    |  $E8   |  $E9  |  $EA  |  $EB |   $EC   |   $ED  |  $EE   |  $EF   
lt. yellow  |  $F8   |  $F9  |  $FA  |  $FB |   $FC   |   $FD  |  $FE   |  $FF   

Sunday, September 8, 2019

VIC20-ASM-001 Clear Screen


slot the VICMON cartridge into your VIC20
start VICMON by entering: SYS 24576



We want to accomplish the following:

  • start program at 1400 and load the clear screen character ($93) into the accumulator
  • run subroutine  ($FFD2) to output the clear screen character ($93) from the accumulator
  • end the program


.A 1400 LDA #$93
.A 1402 JSR $FFD2
.A 1405 BRK
.A 1406




test the program from VICMON by entering: .G 1400

the result will be a clear basic screen with the VICMON information (because we are still running it)

place a clean cassette into the datasette
save the program to tape by entering: .S "CLEARSCREEN",01,1400,1406

press record & play on the datasette as required

when saving is completed, reset your VIC20
rewind cassette
load the program in BASIC by entering: LOAD "CLEARSCREEN"

press play on the datasette. The VIC20 will now be SEARCHING FOR CLEARSCREEN
when CLEARSCREEN is found, the screen will prompt "READY"


run the program by typing: "SYS 5120"

the result will be a cleared BASIC screen

CONGRATULATIONS!

Monday, June 17, 2019

Muscle and Fascia Simulation with XPBD

Here you can see the latest results of my research in muscle and fascia simulation.
I worked on this while in Madrid, working at El Ranchito, together with my colleagues Carlos Monteagudo and Daniel Sanchez 💪

This work was recently published on Computer Graphics Forum, one of the most renewed scientific journals in the field of CG 🤓

No need to say how happy I am with the results 🤩

Muscle and Fascia Simulation with Extended Position Based Dynamics (XPBD) from Marco Romeo on Vimeo.