Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > Controlling the screen cursor
2009-10-09 08:50
Adam

Registered: Jul 2009
Posts: 323
Controlling the screen cursor

Hello! :)
I am trying to code a screen editor using assembler but cannot recall how to limit the cursor to access specific areas of the screen. For example, let's just say I want to be able to edit the screen using the cursor and cursor keys but only be able to move from $400 to $428, how would I set this up?

Thanks..
..Adam/Onslaught/Sidwave
2009-10-09 09:18
Stryyker

Registered: Dec 2001
Posts: 468
You could do all the code to move the curson and avoid the kernal for cursor movement.
2009-10-09 09:27
Adam

Registered: Jul 2009
Posts: 323
Yeah, I don't want to use kernel routines unless I have to. I just need to know what mem locations the cursor uses and then from those addresses I can (hopefully) control the x/y positioning of the cursor location from there. :))

..Adam/Onslaught/Sidwave
2009-10-09 09:42
SIDWAVE
Account closed

Registered: Apr 2002
Posts: 2238
Well, start the cursor at 0400, and use kernal (ffd2) to print chars. Count the chars! make an index, so you always know where your cursor is.

So if you press right 5 times your counter is 4, if you press down 1 time, you add 40 to the y counter.

Use an X and an Y counter!
2009-10-09 09:47
enthusi

Registered: May 2004
Posts: 677
I used quite some kernal routines here:
Georam-Mon 0.10
In case you want to check out...
2009-10-09 11:18
Krill

Registered: Apr 2002
Posts: 2980
Quote: Yeah, I don't want to use kernel routines unless I have to. I just need to know what mem locations the cursor uses and then from those addresses I can (hopefully) control the x/y positioning of the cursor location from there. :))

..Adam/Onslaught/Sidwave


But you are aware that the cursor is implemented by software and made by just manipulating the character at cursor position?
2009-10-09 12:47
Soren

Registered: Dec 2001
Posts: 547
I myself often use a sprite cursor in my music editors.
Got a routine that calculate the correct sprite positions to match char positions.. I only throw X+Y char positions into it and it works nicely. For me this is very nice as I use a colour flashing cursor and the spritecursor is put behind chars, so I easily can see the char the cursor is placed on.
It's quite easy to do, if one wants something else than a char based cursor.
2009-10-09 13:12
JackAsser

Registered: Jun 2002
Posts: 2014
Quote: Yeah, I don't want to use kernel routines unless I have to. I just need to know what mem locations the cursor uses and then from those addresses I can (hopefully) control the x/y positioning of the cursor location from there. :))

..Adam/Onslaught/Sidwave


You never _have_ to use kernel functions fyi. I suggest you write your own cursor routines like Jeff suggested.
2009-10-10 00:00
Skate

Registered: Jul 2003
Posts: 494
I usually code my own cursor routine for my text editors. But for my very first noter, I remember stealing all the necessery parts from kernel and making some changes like prohibiting page scrolling. I don't recommend this method but it's possible.
2009-10-10 09:33
SIDWAVE
Account closed

Registered: Apr 2002
Posts: 2238
Dont work hard, work smart!
2009-10-10 20:16
Angel of Death

Registered: Apr 2008
Posts: 211
You should take a look at this program:
Characterize V0.03
Source is included.
it's Not made by me but it is chockful of useful (kernal utilising) routines including diskop- and textinput routines.

I made a micro text-editor using kernal routines but it's to simple to release and I have no place to upload it to (yet).
let me know if you're interested.
 
... 5 posts hidden. Click here to view all posts....
 
Previous - 1 | 2 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
LKP/CFN
Aomeba/Artline Desig..
Mike
zscs
Lazycow
TheRyk/MYD!
kbs/Pht/Lxt
t0m3000/hf^boom!^ibx
Case/Padua
St0rmfr0nt/Quantum
MWR/Visdom
Chesoner/House Designs
katon/Lepsi De
The Syndrom/TIA/Pret..
Youth
Guests online: 138
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 Edge of Disgrace  (9.6)
6 What Is The Matrix 2  (9.6)
7 The Demo Coder  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 No Listen  (9.6)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 Dawnfall V1.1  (9.5)
7 Rainbow Connection  (9.5)
8 Onscreen 5k  (9.5)
9 Morph  (9.5)
10 Libertongo  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Censor Design  (9.3)
5 Triad  (9.3)
Top Organizers
1 Burglar  (9.9)
2 Sixx  (9.8)
3 hedning  (9.7)
4 Irata  (9.7)
5 Tim  (9.7)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.043 sec.