Jump to content
Sign in to follow this  
scitari

The Interactive 6502 for Atari 8bits

Recommended Posts

I just posted my latest project that provides a BASIC XL program for interacting directly with the 6502 processor registers through a simple point-and-click interface controlled by the joystick. I have been working on this program for my planned exhibit at VCF East in April, but that has been postponed until October. I am pretty happy with how this turned out. Note that this is not a simulation. Each click calls an assembly language program that runs the op code. Comments welcome!

 

http://atariprojects.org/2020/03/14/interact-with-ataris-6502-processor-in-basic-10-15-mins/

 

i6502-Interface.jpg

i6502.txt

i6502.atr

Edited by scitari
  • Like 11
  • Thanks 1

Share this post


Link to post
Share on other sites
On 3/14/2020 at 6:34 PM, scitari said:

I just posted my latest project that provides a BASIC XL program for interacting directly with the 6502 processor registers through a simple point-and-click interface controlled by the joystick. I have been working on this program for my planned exhibit at VCF East in April, but that has been postponed until October. I am pretty happy with how this turned out. Note that this is not a simulation. Each click calls an assembly language program that runs the op code. Comments welcome!

 

http://atariprojects.org/2020/03/14/interact-with-ataris-6502-processor-in-basic-10-15-mins/

 

i6502-Interface.jpg

i6502.txt 14.28 kB · 23 downloads

i6502.atr 90.02 kB · 14 downloads

VERY nice!!!

 

Simple, visual, and the type of work that benefits a large crowd that still perceives the inner magic shrouded in mystery...

 

BY looking at the Basic code, seems like it could be easily expanded for many more instructions.

 

Bring it on!

 

Edited by Faicuai
  • Like 1

Share this post


Link to post
Share on other sites
9 hours ago, Faicuai said:

VERY nice!!!

 

Simple, visual, and the type of work that benefits a large crowd that still perceives the inner magic shrouded in mystery...

 

BY looking at the Basic code, seems like it could be easily expanded for many more instructions.

 

Bring it on!

 

 

Thanks! Yes, this could be expanded. Go for it!

Share this post


Link to post
Share on other sites

Runs under normal BASIC, but very slow to respond to joystick.

Some things to consider:-

 

Would be nice if it displayed the full 8 bits of data and if it did, display in decimal and/or Hex.

Display the status register to see the effects on flags.

 

Appreciate you would probably have to change the Graphics mode to get the info on screen

  • Like 1

Share this post


Link to post
Share on other sites
9 minutes ago, TGB1718 said:

Runs under normal BASIC, but very slow to respond to joystick.

Some things to consider:-

 

Would be nice if it displayed the full 8 bits of data and if it did, display in decimal and/or Hex.

Display the status register to see the effects on flags.

 

Appreciate you would probably have to change the Graphics mode to get the info on screen

 

Thanks! Great suggestions. To get this to run fast in Atari BASIC I would have had to move more of the code to assembly language. I seriously thought about doing that but in the end decided to do it in BASIC XL. The timing of the cursor movement is difficult across flavors of BASIC do to the many IF-THEN statements to check where the cursor is when the fire button is pressed. This is what I would have had to move to assembly. I may yet do that so this will work well with Atari BASIC.

Share this post


Link to post
Share on other sites

Just a thought, if you used GR.1, you could interact by typing numbers into the text window

something like

 

RAM=25

A=10

X=32

Y=5

 

to set the values

Edited by TGB1718
  • Like 1

Share this post


Link to post
Share on other sites
1 hour ago, TGB1718 said:

Just a thought, if you used GR.1, you could interact by typing numbers into the text window

something like

 

RAM=25

A=10

X=32

Y=5

 

to set the values

 

Yeah, thought about entering values and decided to keep it real simple. I originally developed this for VCF East (now postponed) and was imagining people coming by a booth and playing with it for a minute or two. Decided simpler was better for that purpose.

Share this post


Link to post
Share on other sites

Hope you don't mind, but I like what you've done, so I was thinking of a way to expand the number of

instructions on screen if you decided to expand this, but keep the screen mode and format you currently have.

 

I wrote this, basically it creates a GR.2+16 screen, saves the parameters in an array, moves top of

memory down 1K and opens another GR.2 screen saves etc. etc. until you have 4 screens.

 

To use these extra screens, use SELECT and OPTION to move to the other screens.

 

Each screen could be populated with more instrucions.

 

20000 SCREEN=1
20010 CONSOL=53279:DLIST=560
20020 RAMTOP=106:OLD=PEEK(RAMTOP)
20030 SAVMSC=88:REM AND 89
20040 DIM SCREENS(2,4):DIM DLISTS(2,4)
20050 FOR I=1 TO 4
20060 POKE RAMTOP,PEEK(RAMTOP)-(I*4)
20070 GRAPHICS 2+16
20080 SCREENS(1,I)=PEEK(SAVMSC):SCREENS(2,I)=PEEK(SAVMSC+1)
20090 DLISTS(1,I)=PEEK(DLIST):DLISTS(2,I)=PEEK(DLIST+1)
20100 ? #6;"SCREEN ";I
20110 NEXT I
20120 POKE SAVMSC,SCREENS(1,1) : REM RETURN TO SCREEN 1
20130 POKE SAVMSC+1,SCREENS(2,1)
20140 POKE DLIST,DLISTS(1,1)
20150 POKE DLIST+1,DLISTS(2,1)
20160 IF PEEK(CONSOL)=7 THEN 20160
20170 IF PEEK(CONSOL)=5 THEN GOSUB 20210
20180 IF PEEK(CONSOL)=3 THEN GOSUB 20280
20190 GOTO 20160
20200 REM POKE RAMTOP,OLD
20210 IF SCREEN=4 THEN RETURN 
20220 SCREEN=SCREEN+1
20230 POKE SAVMSC,SCREENS(1,SCREEN)
20240 POKE SAVMSC+1,SCREENS(2,SCREEN)
20250 POKE DLIST,DLISTS(1,SCREEN)
20260 POKE DLIST+1,DLISTS(2,SCREEN)
20265 IF PEEK(CONSOL)<>7 THEN 20265
20270 RETURN 
20280 IF SCREEN=1 THEN RETURN 
20290 SCREEN=SCREEN-1
20300 POKE SAVMSC,SCREENS(1,SCREEN)
20310 POKE SAVMSC+1,SCREENS(2,SCREEN)
20320 POKE DLIST,DLISTS(1,SCREEN)
20330 POKE DLIST+1,DLISTS(2,SCREEN)
20335 IF PEEK(CONSOL)<>7 THEN 20265
20340 RETURN 

  • Like 1

Share this post


Link to post
Share on other sites
On 3/17/2020 at 12:54 PM, TGB1718 said:

Hope you don't mind, but I like what you've done, so I was thinking of a way to expand the number of

instructions on screen if you decided to expand this, but keep the screen mode and format you currently have.

 

I wrote this, basically it creates a GR.2+16 screen, saves the parameters in an array, moves top of

memory down 1K and opens another GR.2 screen saves etc. etc. until you have 4 screens.

 

To use these extra screens, use SELECT and OPTION to move to the other screens.

 

Each screen could be populated with more instrucions.

 

20000 SCREEN=1
20010 CONSOL=53279:DLIST=560
20020 RAMTOP=106:OLD=PEEK(RAMTOP)
20030 SAVMSC=88:REM AND 89
20040 DIM SCREENS(2,4):DIM DLISTS(2,4)
20050 FOR I=1 TO 4
20060 POKE RAMTOP,PEEK(RAMTOP)-(I*4)
20070 GRAPHICS 2+16
20080 SCREENS(1,I)=PEEK(SAVMSC):SCREENS(2,I)=PEEK(SAVMSC+1)
20090 DLISTS(1,I)=PEEK(DLIST):DLISTS(2,I)=PEEK(DLIST+1)
20100 ? #6;"SCREEN ";I
20110 NEXT I
20120 POKE SAVMSC,SCREENS(1,1) : REM RETURN TO SCREEN 1
20130 POKE SAVMSC+1,SCREENS(2,1)
20140 POKE DLIST,DLISTS(1,1)
20150 POKE DLIST+1,DLISTS(2,1)
20160 IF PEEK(CONSOL)=7 THEN 20160
20170 IF PEEK(CONSOL)=5 THEN GOSUB 20210
20180 IF PEEK(CONSOL)=3 THEN GOSUB 20280
20190 GOTO 20160
20200 REM POKE RAMTOP,OLD
20210 IF SCREEN=4 THEN RETURN 
20220 SCREEN=SCREEN+1
20230 POKE SAVMSC,SCREENS(1,SCREEN)
20240 POKE SAVMSC+1,SCREENS(2,SCREEN)
20250 POKE DLIST,DLISTS(1,SCREEN)
20260 POKE DLIST+1,DLISTS(2,SCREEN)
20265 IF PEEK(CONSOL)<>7 THEN 20265
20270 RETURN 
20280 IF SCREEN=1 THEN RETURN 
20290 SCREEN=SCREEN-1
20300 POKE SAVMSC,SCREENS(1,SCREEN)
20310 POKE SAVMSC+1,SCREENS(2,SCREEN)
20320 POKE DLIST,DLISTS(1,SCREEN)
20330 POKE DLIST+1,DLISTS(2,SCREEN)
20335 IF PEEK(CONSOL)<>7 THEN 20265
20340 RETURN 

Awesome! Will give this a try today.

Share this post


Link to post
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...