Search found 1998 matches

by Rich Talbot-Watkins
Mon Sep 11, 2023 9:31 am
Forum: programming
Topic: ZP location magically changes its value
Replies: 43
Views: 5690

Re: ZP location magically changes its value

It was only when I decided to disassemble what was actually in memory that I found the problem. The assembler that I was using was inserting the wrong opcode for the conditional jump instruction… Even as recently as within the last year, I've had Visual Studio 2022 generate incorrect code! In this ...
by Rich Talbot-Watkins
Sun Sep 10, 2023 5:27 pm
Forum: programming
Topic: ZP location magically changes its value
Replies: 43
Views: 5690

Re: ZP location magically changes its value

I guess the question here is what was causing the error in BBC BASIC, given that the line as posted looked perfectly reasonable. Agree that an error shouldn't cause it to stop, but why was that line causing an error at all? Was BeebEm getting input faster than it could be consumed, or was there some...
by Rich Talbot-Watkins
Sun Sep 10, 2023 4:00 pm
Forum: programming
Topic: ZP location magically changes its value
Replies: 43
Views: 5690

Re: ZP location magically changes its value

Do you still have the original file which was failing? There's no need to pin the blame on anyone, but you can help improve things for everyone by reporting the issue to the BeebEm team with a solid way to reproduce it. In my experience, part of being a programmer is to understand that all software ...
by Rich Talbot-Watkins
Thu Aug 31, 2023 12:01 pm
Forum: stardot FORUM
Topic: stardot running slow?
Replies: 38
Views: 5917

Re: stardot running slow?

Have you tried pressing the Turbo button on the server?
by Rich Talbot-Watkins
Wed Aug 30, 2023 4:50 pm
Forum: stardot FORUM
Topic: stardot running slow?
Replies: 38
Views: 5917

Re: stardot running slow?

Honestly a lot of bots in the forums at the moment. Right now I see Ahrefs [Bot], Bing [Bot], Bytespider [Bot], Google [Bot], GPTBot [Bot], Majestic-12 [Bot], PetalBot [Bot], Semrush [Bot] and YandexBot [Bot]. Don't know what half of them are, but it'd be good to sort out the bot group permissions a...
by Rich Talbot-Watkins
Wed Aug 30, 2023 11:21 am
Forum: off-topic
Topic: Moving away from GitHub
Replies: 21
Views: 3023

Re: Moving away from GitHub

I wasn't aware of having 2FA set up on my Github accounts, although I just logged into an infrequently used one and it asked for a verification code sent to my email. Maybe that's 2FA, but it didn't involve needing a phone, if that's your pain point!
by Rich Talbot-Watkins
Tue Aug 29, 2023 4:59 pm
Forum: 8-bit acorn hardware
Topic: Video Issue Mode 7, Row Duplication, Cursor Stretch and Screen Rolling
Replies: 6
Views: 345

Re: Video Issue Mode 7, Row Duplication, Cursor Stretch and Screen Rolling

To me this looks like interlaced sync and video not working correctly - I don't think the non-S 6845s support this either, so what you're effectively getting is a regular interlaced mode with 19 scanline high characters!
by Rich Talbot-Watkins
Sun Aug 27, 2023 10:37 am
Forum: programming
Topic: [ARM] Fast normalization approximations.
Replies: 13
Views: 2794

Re: [ARM] Fast normalization approximations.

Yep, that's the alpha max plus beta min algorithm I linked to above! An amazing approximation!
by Rich Talbot-Watkins
Wed Aug 23, 2023 1:03 pm
Forum: off-topic
Topic: Your Maths education - order of operations
Replies: 25
Views: 3200

Re: Your Maths education - order of operations

I think it's subtle but the convention seems to be: x 2 = 4 x = ±2 Here x clearly has two solutions, so the answer is ±2. x = 4 √x = 2 Here we just consider the principal value of the function. This is equally true of things like inverse trigonometric functions which in some sense have an infinite n...
by Rich Talbot-Watkins
Wed Aug 23, 2023 10:14 am
Forum: off-topic
Topic: Your Maths education - order of operations
Replies: 25
Views: 3200

Re: Your Maths education - order of operations

Born in '75, grew up in Surrey. I don't remember BODMAS being explicitly used to teach this, although I remember the mnemonic. It's overkill for what is a simple concept, and also not particularly clear. Also what does the O stand for?! By the time you're writing expressions with 'proper' notation (...
by Rich Talbot-Watkins
Wed Aug 23, 2023 9:53 am
Forum: programming
Topic: [ARM] Fast normalization approximations.
Replies: 13
Views: 2794

Re: [ARM] Fast normalization approximations.

Another thought, given your use case. Since you have a limited range of inputs, perhaps you can do this with two (and a half) tables: - One table mapping (dx,dy) -> arctan(dy/dx), scaled to 0...128 for 0...90 degrees - Another table mapping x -> sin(x/128 * pi/2), and an overlapping one for cos. So ...
by Rich Talbot-Watkins
Tue Aug 22, 2023 3:44 pm
Forum: programming
Topic: [ARM] Fast normalization approximations.
Replies: 13
Views: 2794

Re: [ARM] Fast normalization approximations.

Looks great! The frustrating bit is still that I have to divide the existing components by the magnitude, unless I use a reciprocal lookup for the magnitude. But I'm using fixed point numbers so that would be quite a challenge. I don't think so - the fractional part of your fixed point values will c...
by Rich Talbot-Watkins
Tue Aug 22, 2023 2:21 pm
Forum: programming
Topic: [ARM] Fast normalization approximations.
Replies: 13
Views: 2794

Re: [ARM] Fast normalization approximations.

This is another useful magnitude calculation hack, a bit better than just taking the maximum component: Alpha max plus beta min algorithm It can be expanded to handle 3d vectors in the following way: // get vector components in min, med, max value order min = abs(vec.x) med = abs(vec.y) max = abs(ve...
by Rich Talbot-Watkins
Tue Aug 22, 2023 10:00 am
Forum: 32-bit acorn software: classic games
Topic: Hacker needed ... for Zarch ;-)
Replies: 184
Views: 77303

Re: Hacker needed ... for Zarch ;-)

I think the point is more that triangles are a kind of basic primitive - you can build any filled polygon from triangles - however, a dedicated quad renderer will always be faster than rendering the equivalent two adjacent triangles. But consider that such a quad renderer will almost certainly be ex...
by Rich Talbot-Watkins
Mon Aug 21, 2023 12:35 pm
Forum: 8-bit acorn software: other
Topic: Emulator Accuracy and the T1 timer - explorations
Replies: 18
Views: 740

Re: Emulator Accuracy and the T1 timer - explorations

I'm not feeling well, but could you swap a and X and then cpx #3 ADC #&ff I don't think so - I was trying to find some way of doing that, but the carry flag needs to be inverted (where's the complement carry flag instruction?) and then ADC #0. I guess you could put EOR #255 either side... or CL...
by Rich Talbot-Watkins
Sun Aug 20, 2023 8:31 pm
Forum: 8-bit acorn software: other
Topic: Emulator Accuracy and the T1 timer - explorations
Replies: 18
Views: 740

Re: Emulator Accuracy and the T1 timer - explorations

I have always just used LDA &FE64:LDX &FE65:CMP #3:BCS P%+3:INX:STA &80:STX &81 to read the 16-bit timer value. It doesn't quite run in constant time but I've never found it to matter much (if you really cared I guess you could align the code so that the taken branch crossed a page b...
by Rich Talbot-Watkins
Fri Aug 18, 2023 2:28 pm
Forum: 8-bit acorn hardware
Topic: CRTC timing with 2MHz clock
Replies: 17
Views: 3605

Re: CRTC timing with 2MHz clock

The falling edge of 1MHzE and 2MHzE always coincide. Yellow = 2MHzE Blue = 1MHzE even case: https://stardot.org.uk/forums/download/file.php?id=49508&t=1 odd case: https://stardot.org.uk/forums/download/file.php?id=49507&t=1 Excuse the bump! I was looking at the circuit diagram and saw that ...
by Rich Talbot-Watkins
Sat Jul 29, 2023 9:27 am
Forum: 8-bit acorn software: other
Topic: something weird !
Replies: 60
Views: 2650

Re: something weird !

[The 6522 datasheets are clear: writing ORB clears the CB1 interrupt flag. Ergo the CB1 IRQ can go missing in a small race window. With the caveat that, if you write the non-handshake version (&FE4F), that doesn't happen. And I think that's generally what the OS does, though I might be mistaken!
by Rich Talbot-Watkins
Fri Jul 28, 2023 1:04 pm
Forum: programming
Topic: Printing hex values
Replies: 11
Views: 2796

Re: Printing hex values

Code: Select all

>P.STR$~255
FF
>
?

It's not really very obvious to be honest. ~ isn't really an operator in the sense that you can use it anywhere to turn a numeric value into a hex string - it's just a special case hacked into STR$ and PRINT.
by Rich Talbot-Watkins
Fri Jul 21, 2023 3:31 pm
Forum: programming
Topic: Assembling large code
Replies: 12
Views: 2898

Re: Assembling large code

My old build system used to work something like this: File S.Core: 10 LOMEM=&3000:HIMEM=&5000:top%=TOP-2:code%=&1100 20 FOR pass%=4 TO 6 STEP 2 30 P%=code%:O%=HIMEM 40 FOR file%=1 TO 5 50 OSCLI"LOAD S.Part"+STR$file%+" "+STR$~top% 60 PROCassemble 70 NEXT 80 NEXT 90 OS...
by Rich Talbot-Watkins
Fri Jul 21, 2023 11:33 am
Forum: programming
Topic: [ARM] Drawing a large amount of small (8x12) sprites.
Replies: 4
Views: 2239

Re: [ARM] Drawing a large amount of small (8x12) sprites.

Yeah I guess that's what I was thinking! Though you would probably want to pass the pointers in R0 and R1, and then use R13/14 as scratch registers once you've saved them somewhere. Note that in your case you were looking at plotting smaller sprites than 32 pixels wide, so you wouldn't use so many r...
by Rich Talbot-Watkins
Wed Jul 19, 2023 10:53 am
Forum: programming
Topic: [ARM] Drawing a large amount of small (8x12) sprites.
Replies: 4
Views: 2239

Re: [ARM] Drawing a large amount of small (8x12) sprites.

I started a thread here on this subject which was interesting until it got disrupted by bickering. Maybe some useful stuff there to start with?
by Rich Talbot-Watkins
Thu Jul 06, 2023 6:59 am
Forum: 8-bit acorn hardware
Topic: Who else is building a Beeb from scratch?
Replies: 288
Views: 227450

Re: Who else is building a Beeb from scratch?

What are homebrew Beeb builders doing for parts which are no longer available, like the Video or Serial ULAs? Raiding old dead Beebs for parts, or are there modern alternatives à la VideoNuLA?
by Rich Talbot-Watkins
Mon Jul 03, 2023 7:22 am
Forum: 8-bit acorn software: other
Topic: Tripping up emulators with a special JSR
Replies: 12
Views: 1041

Re: Tripping up emulators with a special JSR

I think the more surprising thing about JSR (particularly from the perspective of an emulator author) is the order it does its memory accesses. Most absolute mode opcodes fetch the lab and msb of the operand on the second and third cycles, but if you look at Visual 6502, or the 6502 hardware manual,...
by Rich Talbot-Watkins
Thu Jun 22, 2023 1:41 pm
Forum: new ideas wishlist & general chat
Topic: Ghostbusters (Activision)
Replies: 38
Views: 6576

Re: Ghostbusters (Activision)

I'm sure there's already a Beeb rendition of the theme tune out there somewhere!

(Edit: yes, of course there is...
https://www.youtube.com/watch?v=tvfu25w4hWg )
by Rich Talbot-Watkins
Wed Jun 07, 2023 5:01 pm
Forum: programming
Topic: ROM FS format
Replies: 12
Views: 800

Re: ROM FS format

Never really played with ROMFS or created anything for it, but could never really understand how or if it were possible to have a file spanning more than one ROM. Could one ROM hand off to another mid-file? Or how would two independent ROMs cooperate on providing ROMFS content if they would generall...
by Rich Talbot-Watkins
Mon Jun 05, 2023 9:12 pm
Forum: 8-bit acorn software: other
Topic: Detecting machine type and multi-OS switchers
Replies: 12
Views: 776

Re: Detecting machine type and multi-OS switchers

Yes, I think I once concluded that the result of INKEY(-256) was undefined, but yielded different and consistent values in OS 0.1 and OS 1.20. And people realised they could use it as a hacky way of determining the OS version (maybe OS 0.1 didn't have OSBYTE 0?), so they did. And after that it was a...
by Rich Talbot-Watkins
Sun May 28, 2023 10:19 am
Forum: 8-bit acorn hardware
Topic: 8271 floppy controller reverse engineer journey write-up
Replies: 27
Views: 4651

Re: 8271 floppy controller reverse engineer journey write-up

beebjit, while not implementing an instruction level emulator, does emulate the internal register usage and general timing implied by our reverse engineering effort. This is apparently enough to reproduce many, if not all, of the corner cases and hackery which we see on real hardware! It'd certainly...
by Rich Talbot-Watkins
Fri May 19, 2023 11:36 am
Forum: development tools
Topic: beebasm v1.10
Replies: 26
Views: 5943

Re: beebasm v1.10

DEC wouldn't work though if the source block overlaps with the destination block (I don't know how big the block is that's being copied). Honestly the very simplest workaround if possible is to index with Y, and use X as a counter for the memory pages you copy.

Go to advanced search