|
View previous topic :: View next topic |
Author |
Message |
tomz/TIDE Moderator
Joined: 08 Jul 2007 Posts: 562 Location: nsw.Australia
|
Posted: Sat Aug 04, 2007 12:04 am Post subject: All about coding and programming! |
|
|
Got a problem with some program, need some coding help?Or maybe you are just interested in typing a few lines for instant results. This is the posting to find it in. I will start with some basic stuff and also include something for these who like to uise an Assembler. Do not confuse this part with the pokes and hints part.
The 1st basic prg is just a simple converter, t converts prg (PRG) to sequential files (SEQ)
1 open3,8,3,"prg.file,p,r"
2 open2,8,2,"seq.file,s,w"
3 et#3,a$:if st then 6
4print#2,a$;
5 goto 3
6 print#2,a$:close2:close3
if you use this on your PRG files they will be copied as SEQ files
And now for somehing on the Assembler,heres a lil rtn that detects you pressing the CBM key
LOOP LDA $028D
AND #$02
CMP #$02
BNE LOOP
RTS
OOOOPS hold on, Ive just thought of another way we can do this and its smaller.............
Heres the same thing (results wise)
LDA #$02
LOOP BIT $028D
BEQ LOOP
RTS
Both of those will do the same,one is just Optimised a lil bit more
tomz _________________ http://noname.c64.org/csdb/scener/?id=1971 |
|
Back to top |
|
|
tomz/TIDE Moderator
Joined: 08 Jul 2007 Posts: 562 Location: nsw.Australia
|
Posted: Mon Aug 27, 2007 9:28 pm Post subject: All about coding and programming |
|
|
I think I may have erred slightly in my previous posting, no there wasnt anything wrong with either bit of code, its just that this is a RETRO forum so from now on, unless someone requests a certain something by way of code, I will try to keep everything in here GAME related.
Have you ever wondered how crackers train a game,what they actual have to do,maybe you have a fave commy game but you never get past a certain level,well this is where a cracked game(or one with trainers) is the only absolute sure way you are going to see the end screen......
If you have a cart with monitor features then once you have loaded your game,FREEZE it whilst you look in certain areas of memory, this is only one way.....
Find LDA $D01E
(AD 1E D0)
Change every address like that to
LDA #$00 or NOP (assemblers vary slightly)
If you cant find LDA $D01E
Then search for LDX $D01E
(AE 1E D0)
or
LDY $D01E
(AC 1E D0)
If you find these last two areas then change them to
LDX #$00 or NOP
and/or respectevly LDY #$00 or NOP
When the game is restarted you should have invincibility _________________ http://noname.c64.org/csdb/scener/?id=1971 |
|
Back to top |
|
|
tomz/TIDE Moderator
Joined: 08 Jul 2007 Posts: 562 Location: nsw.Australia
|
Posted: Sun Sep 30, 2007 10:24 pm Post subject: All about coding and programming |
|
|
Some time has passed and maybe you have a game thats giving you some problems,you just cant finish a level or something similar,then why not post your C64 problem here,eve if its not game related we may be of some help,and dont forget many C64 games have pokes that will give U infinity lives etc so dont hesitate post your programming questions here even if its only a poke that you are after,in the mean time heres some info to all you would be crakers,if you own an Action Replay cart then remember that memory location #$8E is changed by this cart which may effect your gameplay if U wanted INFY lives etc.
Anyway heres a way you can dress up your DIRs, make them colourful etc
Quote: |
1 OPEN15,8,15
2 PRINT#15,"NO:''+CHR$(141)+CHR$(2+"TI"+CHR$(150)+"D"+CHR$(158)+"E,"+"03"
|
There that will give you a colourful Directory on your disks..........
tomz _________________ http://noname.c64.org/csdb/scener/?id=1971 |
|
Back to top |
|
|
tomz/TIDE Moderator
Joined: 08 Jul 2007 Posts: 562 Location: nsw.Australia
|
Posted: Sun Oct 14, 2007 9:36 pm Post subject: All about coding and programming |
|
|
Some time has passed so I thought I would add something else here for the C64 gamer/programmer? (are you really?)
If by chance you are mucking around with basic and you want to know how to do something, just post it here or PM if you want to keep things out of herer, but I will do my best to solve your coding problem, and of coz if I cant do it then I do have many C64 pals I can call on to help me, so that I can look good in your eyes (this last bit is a joke of coz )
Okay heres an 8 line banner scroll for all you basic buffs and its only 6 lines long, so how easy is that AYE??? aye?? (6 will get you 8 better than the TAB!!)
10 INPUT"(rev heart)";A$:A$+" "PRINT"(rev heart)"
20 C$=CHR$(20):M=LEN(A$):DIM A$(M)
30FORL=1TOM:A$(L)=MID$(A$,L,1):NEXT
40 FORL=1TOM:PRINT"(REV S);:FORK=1TO5
50 PRINT"Retrobrad Forums"C$TAB(3A$(L):NEXT:NEXT
60 GOTO 40
Just type that up and mess around with it, you can display whatever message you want but I just thought RETROBRAD FORUMS was a nice enough message to put in there.............
tomz _________________ http://noname.c64.org/csdb/scener/?id=1971 |
|
Back to top |
|
|
Daniel C novice
Joined: 20 Sep 2007 Posts: 99
|
Posted: Thu Nov 01, 2007 10:07 pm Post subject: |
|
|
What's programming? _________________ Daniel C |
|
Back to top |
|
|
tomz/TIDE Moderator
Joined: 08 Jul 2007 Posts: 562 Location: nsw.Australia
|
|
Back to top |
|
|
Daniel C novice
Joined: 20 Sep 2007 Posts: 99
|
Posted: Sat Nov 03, 2007 6:58 pm Post subject: |
|
|
What's coding? _________________ Daniel C |
|
Back to top |
|
|
tomz/TIDE Moderator
Joined: 08 Jul 2007 Posts: 562 Location: nsw.Australia
|
Posted: Sat Nov 03, 2007 7:30 pm Post subject: All about coding and programming |
|
|
Drop a line over the side of the boat,and below where the Cod swim around.......oops sorry thats for the REX HUNT forum.
Coding or programming is the term used to describe how software(ie. Games) are made The C64 is an ideal introduction to coding
(do not ask what software is, please............... )
tomz _________________ http://noname.c64.org/csdb/scener/?id=1971 |
|
Back to top |
|
|
tomz/TIDE Moderator
Joined: 08 Jul 2007 Posts: 562 Location: nsw.Australia
|
Posted: Sun Dec 09, 2007 12:31 am Post subject: All about coding and programming |
|
|
For those of us on C64 who dabble in basic V2 heres a 25 line program that takes about 5 minutes to type in, but will last as your screen saver for years to come (yeah sure tom) its a rotating multicoloured raster bar that moves up and down the screen. The borders top,bottom and sides are no longer visible just to add that bit of profesionalism to it and Ive been told it looks rather nice especially as its done in basic and not in an assembler so I decided to share it here with you.
Code: |
1 PRINT"REV HEART":POKE53280,0:POKE53281,0
2 FOR I=0 TO 159
3 READ A
4 POKE49152+I,A
5 M=M+A
6 NEXT
7 IF M<>16196 THEN PRINT"WHERE DID I MISTYPE THIS?":STOP
8 SYS49152
10 DATA 120,169,38,162,192,141,20,3,142,21
11 DATA 3,169,18,141,18,208,133,251,173,17
12 DATA 208,41,127,141,17,208,169,129,141,26
13 DATA 208,169,0,141,32,208,88,96,173,25
14 DATA 208,141,25,208,48,7,173,13,220,88
15 DATA 76,49,234,120,162,33,189,119,192,141
16 DATA 33,208,141,32,208,160,10,136,208,253
17 DATA 202,208,239,230,251,230,251,208,14,173
18 DATA 73,192,73,32,141,73,192,141,75,192
19 DATA 76,73,192,165,251,141,18,208,88,174
20 DATA 153,192,160,32,185,120,192,153,121,192
21 DATA 136,208,247,142,121,192,76,188,254,0
22 DATA 0,4,8,2,3,7,7,7,7,7
23 DATA 7,76,14,13,5,4,8,2,3
24 DATA 7,7,7,7,7,7,7,7,7,7
25 DATA 6,14,13,5,1,1,1,1,1,1
26 GOTO 26 |
* line 1s rev heart is just the shift and clear home keys pressed at same time together
I have checked and double checked again all values etc and if you type this exactly as you see it here,it works just fine
tomz |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|