Search found 11 matches

by Finn
Thu Jan 17, 2013 8:52 pm
Forum: Programming
Topic: Beginner Needs Help in 6809 code, but 6502 is fine too!
Replies: 21
Views: 7257

Re: Beginner Needs Help in 6809 code, but 6502 is fine too!

BigEd wrote:
Great! Always good to see a "Hello World" program, although in this case it's all boxes...
thank you BigEd :) Don't forget the dots, those boxes get all the attention...
by Finn
Thu Jan 17, 2013 8:47 pm
Forum: Programming
Topic: Why use these Instruction Sequences?
Replies: 9
Views: 1164

Re: Why use these Instruction Sequences?

Inexperience? I've dug through loads of 6502 code and it still surprises me what sort of inefficiencies people use. One bit of code I saw used repeated instances of:
LDX #cmd AND 255:LDY #cmd DIV 256:JSR oscli
...
.cmd:EQUS "FX 225,1":EQUB 13
instead of:
LDA #255:LDX #1:LDY #0:JSR osbyte

when ...
by Finn
Wed Jan 16, 2013 5:20 pm
Forum: Programming
Topic: Beginner Needs Help in 6809 code, but 6502 is fine too!
Replies: 21
Views: 7257

Re: Beginner Needs Help in 6809 code, but 6502 is fine too!

Thanks to everyone who helped me in this thread. I have finally written my first Vectrex Program now. It bounces 20 squares and 20 dots around the screen. Since I am new to all this it took me a while to actually understand what I was doing, and i had to overcome quite a lot of problems, but I got ...
by Finn
Tue Jan 08, 2013 9:00 pm
Forum: Programming
Topic: Why use these Instruction Sequences?
Replies: 9
Views: 1164

Re: Why use these Instruction Sequences?

Thanks for the insights, I didn't even think about any of those things!
PaulF wrote:
One reason for using these sequences of instructions would be to leave the number of lives remaining in a register so it could then be displayed.
That's a very good point
by Finn
Tue Jan 08, 2013 3:24 pm
Forum: Programming
Topic: Why use these Instruction Sequences?
Replies: 9
Views: 1164

Why use these Instruction Sequences?

I was reading an old article in a BBC Micro magazine about hacking games to give you extra lives. One of the things they suggest is to search through the program for the sequence of 6502 instructions that would reduce the player's lives by one. What puzzled me and what my question here is about - is ...
by Finn
Mon Nov 12, 2012 9:54 pm
Forum: Programming
Topic: Beginner Needs Help in 6809 code, but 6502 is fine too!
Replies: 21
Views: 7257

Re: Beginner Needs Help in 6809 code, but 6502 is fine too!

That totally makes sense -- for what you're doing you need to direct your attention to the BIOS calls. Others (like me) can't rest until they've grokked the hardware interface. :D

haha yes i have no idea what you guys are talking about now ;)

I did look into the source code for Thrust and it ...
by Finn
Sat Nov 10, 2012 11:13 pm
Forum: Programming
Topic: Beginner Needs Help in 6809 code, but 6502 is fine too!
Replies: 21
Views: 7257

Re: Beginner Needs Help in 6809 code, but 6502 is fine too!

EDIT: I think i have got that AND wrong. what should it be to detect 32 or -32? is this possible?

It's true that if AND #$1f is zero, then it's exactly a multiple of 32, including negatives. However, zero is also a multiple of 32.

One of the shortest ways I can think of to do a range test is ...
by Finn
Thu Nov 08, 2012 9:32 pm
Forum: Programming
Topic: Beginner Needs Help in 6809 code, but 6502 is fine too!
Replies: 21
Views: 7257

Re: Beginner Needs Help in 6809 code, but 6502 is fine too!

Yes it's great, very smooth too. You wouldnt think the Vectrex's screen would work well for Defender since it's quite narrow, but it's a very good game. Vector Pilot is also really good, that only came out last year.

BigEd wrote :- I think I was planning some kind of dual-ported RAM based ...
by Finn
Thu Nov 08, 2012 5:15 pm
Forum: Programming
Topic: Beginner Needs Help in 6809 code, but 6502 is fine too!
Replies: 21
Views: 7257

Re: Beginner Needs Help in 6809 code, but 6502 is fine too!

Garth Wilson wrote:- As far as the multiply instruction, how about a whole set of hyper-fast 16-bit math tables?

Thanks Garth. i like the sound of those look up tables. There is a fair amount of space on vectrex carts, so i could probably use something like that. Providing i am actually capable ...
by Finn
Tue Nov 06, 2012 9:31 pm
Forum: Programming
Topic: Beginner Needs Help in 6809 code, but 6502 is fine too!
Replies: 21
Views: 7257

Re: Beginner Needs Help in 6809 code, but 6502 is fine too!

Thanks for the tips and replies. i am just reading through them and trying to understand.

I screwed up the BASIC code (there is no hope for me in assembly!)

should be

Repeat

xMan=XMan+Xv

If XMan>20 then XMan=20 : Xv=-Xv
If XMan<-20 then XMan=-20 : Xv=-Xv

Until Escape key pressed

i ...
by Finn
Mon Nov 05, 2012 4:54 pm
Forum: Programming
Topic: Beginner Needs Help in 6809 code, but 6502 is fine too!
Replies: 21
Views: 7257

Beginner Needs Help in 6809 code, but 6502 is fine too!

I hope it's ok to ask this here because it's 6809 code, but it's pretty similar to 6502 so i hoped it would be ok. (i cant find any 6809 forums!) I am a *complete* beginner but i am trying to write a program for the Vectrex console, hence the 6809

To Start with i wanted to just make a dot move left ...