6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Fri Sep 20, 2024 9:46 pm

All times are UTC




Post new topic Reply to topic  [ 47 posts ]  Go to page Previous  1, 2, 3, 4
Author Message
PostPosted: Thu Jan 24, 2019 9:06 am 
Offline
User avatar

Joined: Tue Mar 02, 2004 8:55 am
Posts: 996
Location: Berkshire, UK
For a 32-bit number subtracting from zero is quicker than complementing and incrementing
Code:
sec
lda #0
sbc binvlq+0
sta tc+0
lda #0
sbc binvlq+1
sta tc+1
lda #0
sbc binvlq+2
sta tc+2
lda #0
sbc binvlq+3
sta tc+3

_________________
Andrew Jacobs
6502 & PIC Stuff - http://www.obelisk.me.uk/
Cross-Platform 6502/65C02/65816 Macro Assembler - http://www.obelisk.me.uk/dev65/
Open Source Projects - https://github.com/andrew-jacobs


Top
 Profile  
Reply with quote  
PostPosted: Thu Jan 24, 2019 10:14 am 
Offline

Joined: Wed Sep 11, 2013 8:43 pm
Posts: 207
Location: The Netherlands
@Chromatix
Quote:
Perhaps you could upload the code as it presently stands
Sure thing:
Attachment:
Player31 bugfix working version.asm [21.41 KiB]
Downloaded 61 times

Quote:
I recall previously you said the tempo didn't vary with CPU speed
The difference is more noticeable with the MIDI file I’m using now. (from Duke3d) So I’m not so sure anymore if CPU speed didn’t matter back then when I stated that. I might test that again. However it is rather subtle.

Quote:
The solution will probably be that "better timer" I described previously.
Hmm, I’m not sure if I’m up to that task right now, it seems rather daunting. In addition, the MIDI file player is supposed to be relatively simple because the MIDI file is supposed to be playing in the background in conjunction with a scan line interrupt provided by the Video Display Processor. The VDP will give a 60Hz interrupt which should have priority over all other interrupts.

Hardware wise my computer is almost ready and I’m realizing that I have to learn a lot on the software front, especially on multiple interrupt handling.

Quote:
Optimising your code is also likely to help
Yes, I think there’s a lot of room to optimize it. I probably should start using the ‘816 features of my CPU.

@BDD
Quote:
Is your MIDI machine running on a 65C02 or 65C816?
My computer MARC-4 is running on a WDC65C816S @8MHz, or 4, 2 and 1MHz, selectable by software. Perhaps I should make a little presentation in a new thread, like I said it’s almost done and I’m really just testing various features at a time and see if they work.

@BitWise
Quote:
For a 32-bit number subtracting from zero is quicker than complementing and incrementing
Well, I’d like to be able to measure the amount of cycles a routine uses, but I guess that’s more of an emulator thing? Thinking about it, I could use my simple 8-bit logic analyzer to measure the difference of the start and end of a routine. (by flipping an output bit)

_________________
Marco


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 47 posts ]  Go to page Previous  1, 2, 3, 4

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 12 guests


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 post attachments in this forum

Search for:
Jump to: