Search found 696 matches

by AJW
Mon May 25, 2020 9:53 pm
Forum: programming
Topic: Indirection operations
Replies: 28
Views: 594

Re: Indirection operations

Here's the code to obtain the ascii code of the sprite from a lookup stored at &1300 row of 38 consecutively. The first row (see attached) is scrolling accurately but the other rows are nonsense (e.g.second row should be blank). lksp5%?f3%=f3%MOD20 and lksp6%?f3%=f3%DIV20 going from 0-139 should be ...
by AJW
Mon May 25, 2020 6:43 pm
Forum: programming
Topic: Indirection operations
Replies: 28
Views: 594

Re: Indirection operations

Thanks. Will update if I make more progress.
by AJW
Mon May 25, 2020 5:14 pm
Forum: programming
Topic: Indirection operations
Replies: 28
Views: 594

Re: Indirection operations

Here's the result so a few things to check.
by AJW
Sun May 24, 2020 11:01 pm
Forum: programming
Topic: Indirection operations
Replies: 28
Views: 594

Re: Indirection operations

So I think I end up with the y-value 38x in &88-89 and the x-value in &7E.
Is it correct to add these:
CLC:LDA&88:ADC&7E:STA&88
LDA&89:ADC#0:STA&89



Then add to &1300 where hopefully I can store the ascii table.
by AJW
Sun May 24, 2020 7:45 pm
Forum: programming
Topic: Indirection operations
Replies: 28
Views: 594

Re: Indirection operations

This will hopefully be the last one. I have lookup tables containing the x and y position of sprites within a 38x18 map given a sprite block counter, X, which goes from 0-139 on screen (20across x 7 down). I then add in the offsets for the onscreen scroll, x% (&7E) and y%(&7F), but need to multiply ...
by AJW
Sun May 24, 2020 4:14 pm
Forum: programming
Topic: 2s complement in division
Replies: 2
Views: 70

Re: 2s complement in division

I think it is probably assuming the number written down is 0111 then.
by AJW
Sun May 24, 2020 1:25 pm
Forum: programming
Topic: 2s complement in division
Replies: 2
Views: 70

2s complement in division

Just reading about multiplication and division in binary and following an exercise for long division. 10010.001//11.1 I get down to subtracting the divisor 111 from the working dividend 1001 and have to do a 2s complement of 111. The exercise says this is 1001 but how is that the 2s complement? Sure...
by AJW
Sat May 23, 2020 5:45 pm
Forum: programming
Topic: Indirection operations
Replies: 28
Views: 594

Re: Indirection operations

So store the high bytes in another table? Ok, thanks, will try that.
by AJW
Sat May 23, 2020 5:37 pm
Forum: programming
Topic: Indirection operations
Replies: 28
Views: 594

Re: Indirection operations

The index can only be 255 max though?
by AJW
Sat May 23, 2020 5:25 pm
Forum: programming
Topic: Indirection operations
Replies: 28
Views: 594

Re: Indirection operations

Is there any way of accessing a lookup table with double byte size. This obviously does not yet work: 225LDX counter2 \low byte of index 230LDA lksp3%,X \low byte of offset 240STA &81:JSRctr2 245LDX counter2+1 \high byte of index 250LDA lksp3%,X \get high byte 260STA &82:JSR ctr2 312.ctr2 INCcounter...
by AJW
Fri May 22, 2020 1:04 pm
Forum: programming
Topic: Equb equw equd etc
Replies: 24
Views: 1083

Re: Equb equw equd etc

Surprised I got away with that for so long. Thanks to both of you.
by AJW
Fri May 22, 2020 11:34 am
Forum: programming
Topic: Equb equw equd etc
Replies: 24
Views: 1083

Re: Equb equw equd etc

tricky wrote:
Fri May 22, 2020 7:03 am
Are you setting P% inside the loop?
No outside.
by AJW
Fri May 22, 2020 11:33 am
Forum: programming
Topic: Equb equw equd etc
Replies: 24
Views: 1083

Re: Equb equw equd etc

Don't know what you did there. Got rid of some LDAs in the first part, because the accumulator doesn't change value after an STA and took advantage of the fact that you know the values of the absolute values you are storing to rearrange the calculation to get rid of unnecessary loads/stores. E.g. 2...
by AJW
Fri May 22, 2020 10:22 am
Forum: programming
Topic: Equb equw equd etc
Replies: 24
Views: 1083

Re: Equb equw equd etc

dp11 wrote:
Thu May 21, 2020 11:28 pm
can you post the full code ?
A bit long to go through entirely. I'll have another look. The m% is a byte array so maybe Ive overwritten something although why this would break the program during assembly is another question.
by AJW
Fri May 22, 2020 10:13 am
Forum: programming
Topic: Equb equw equd etc
Replies: 24
Views: 1083

Re: Equb equw equd etc

291.sl 292LDA#0:STA&83:LDA#0:STA&84:CLC:LDA&83:ADC&77:STA&77:LDA&84:ADC&78:STA&78:RTS 293.tr 294LDA#64:STA&83:LDA#0:STA&84:CLC:LDA&83:ADC&77:STA&77:LDA&84:ADC&78:STA&78:RTS Not sure about the error, but you could optimise the above a little as follows: 291.sl 292LDA#0:STA &83:STA &84:CLC:ADC &77:ST...
by AJW
Thu May 21, 2020 11:24 pm
Forum: programming
Topic: Equb equw equd etc
Replies: 24
Views: 1083

Re: Equb equw equd etc

It's not unfortunately.
by AJW
Thu May 21, 2020 11:00 pm
Forum: programming
Topic: Equb equw equd etc
Replies: 24
Views: 1083

Re: Equb equw equd etc

Sorry if I've missed the answer but why does the assembler produce "out of range at line 287" from this, using OPT 0 to 3 STEP 3. P%=&900 and m%=&C00. The code doesn't reach &B00. 285LDX &79:LDA m%,X \get ascii of sprite at current plot pos 286CMP#94 287BEQ sl 288CMP#88 289BEQ tr 290RTS 291.sl 292LD...
by AJW
Thu May 21, 2020 4:48 pm
Forum: programming
Topic: Indirection operations
Replies: 28
Views: 594

Re: Indirection operations

Yes.
Almost there:
by AJW
Thu May 21, 2020 3:39 pm
Forum: programming
Topic: Indirection operations
Replies: 28
Views: 594

Re: Indirection operations

!&77=&C00 should do that? Yes, but please note that this also writes 0 to &79 and &7A. It writes 4 bytes at once! That explains a couple of problems. Here's my lookup which is supposed to print consecutive blocks 20 horizontally and 7 vertically (mode 1). Base address of &5800 is in &72-3 which is ...
by AJW
Thu May 21, 2020 3:35 pm
Forum: programming
Topic: Indirection operations
Replies: 28
Views: 594

Re: Indirection operations

By coincidence, I posted some code earlier in the week which uses this addressing mode, to fetch 16,384 bytes sequentially from the ROM area. I've always found the Advanced User Guide a splendid reference work for 6502 machine code and BBC BASIC assembler. Here's a snippet (p.39) which describes th...
by AJW
Thu May 21, 2020 10:41 am
Forum: programming
Topic: Indirection operations
Replies: 28
Views: 594

Re: Indirection operations

!&77=&C00 should do that?
by AJW
Thu May 21, 2020 9:20 am
Forum: programming
Topic: Indirection operations
Replies: 28
Views: 594

Re: Indirection operations

Thanks. I think its the base address Im feeding the plot routine is repetitively added in. However i noticed a load from sprite data operation had stopped working:

LDA sp%,X works
LDA (&77),X doesn't

Where sp%=&C00 and !&77=&C00
by AJW
Wed May 20, 2020 5:26 pm
Forum: programming
Topic: Indirection operations
Replies: 28
Views: 594

Re: Indirection operations

Here again trying to get a soft-scrolling map that works using screen offset lookup tables, using assembler. The tables seem to work fine in a BASIC version. It calls a 16x16 Mode 1 sprite plotter (.plot) that works fine alone. the map is 20x7 onscreen blocks at one time. &72 and &73 are passed to t...
by AJW
Tue May 19, 2020 7:43 pm
Forum: new bbc and electron games from 'retro software'
Topic: Planet Nubium Two - The Sequel
Replies: 28
Views: 1796

Re: Planet Nubium Two - The Sequel

CMcDougall wrote:
Fri Mar 06, 2020 5:13 pm
pure brilliant =D> =D> =D>
How did you design your loader? Nice.
by AJW
Mon May 18, 2020 1:57 pm
Forum: programming
Topic: Real resolution of Mode 7
Replies: 14
Views: 377

Re: Real resolution of Mode 7

480x500 pixels. Imagine if it could have been exploited. Sure i read about the isue in a magazine before or PD program.
by AJW
Mon May 18, 2020 1:35 pm
Forum: 8-bit acorn emulators
Topic: BeebEm Mac - Info
Replies: 130
Views: 8714

Re: BeebEm Mac - Info

Might be interesting to know who is, might or would use BeebEm on Mac. i.e. for testing purposes. Currently we know of - Jon Welch (primary maintainer) - You (guddler, maintainer helper in training?) - Me (elminster) - Lurkio - Dave Hitchins - geraldholdsworth - Danielj - mlouka Anyone else? I am t...
by AJW
Mon May 18, 2020 1:34 pm
Forum: 8-bit acorn emulators
Topic: Latest version of BeebEm
Replies: 66
Views: 8044

Re: Latest version of BeebEm

Thanks
by AJW
Mon May 18, 2020 8:44 am
Forum: programming
Topic: Real resolution of Mode 7
Replies: 14
Views: 377

Real resolution of Mode 7

What is the pixel resolution of Mode 7 text? Isn't it possible to use this for graphics?
by AJW
Mon May 18, 2020 8:26 am
Forum: 8-bit acorn emulators
Topic: Latest version of BeebEm
Replies: 66
Views: 8044

Re: Latest version of BeebEm

Is this related to Mac Beebem?
by AJW
Sat May 16, 2020 7:11 pm
Forum: programming
Topic: JSR&FFEE
Replies: 18
Views: 407

Re: JSR&FFEE

May i ask how prnyb returns to the main loop and why you used BCC?

Go to advanced search