|
Does this assembly stuff look like this?
; =========================================================================================
; Parameters:
; RE.0 X coordinate of the sprite
; RE.1 Y coordinate of the sprite
; RF Pointer to sprite
; RD Size of the sprite in bytes
;
; Internal:
; RC Pointer to video memory
; =========================================================================================
DrawSprite: DEC R2
LDI hi(DisplayBuffer) ; calculate the offset in the video buffer
PHI RC ; DisplayBuffer + Y * 8 + X / 8
GHI RE ; result goes to RC
IF Resolution == 20H
ANI 1FH ; between 0 - 31
ENDIF
IF Resolution == 40H
ANI 3FH ; or 0 - 63
ENDIF
IF Resolution == 80H
ANI 7FH ; or 0 - 127
ENDIF
SHL
SHL
SHL
PLO RC
BNF DSP_SkipIncrement
GHI RC
ADI 01H
PHI RC
DSP_SkipIncrement: GLO RC
STR R2
GLO RE
ANI 3FH
SHR
SHR
SHR
ADD
PLO RC
GLO RE ; calculate the number of required shifts
ANI 07H ; result to RE.1, replacing the Y coordinate
PHI RE ; RE.0 will be used later to count the shifts
DSP_ByteLoop: GLO RD ; exit if all bytes of the sprite have been drawn
BZ DSP_Exit
IF Resolution == 20H ; or if we are about to draw outside the video buffer
LDI hi(DisplayBuffer) ; only one page at 64 x 32
ENDIF
IF Resolution == 40H
LDI hi(DisplayBuffer) + 1 ; two pages at 64 x 64
ENDIF
IF Resolution == 80H
LDI hi(DisplayBuffer) + 3 ; four pages at 64 x 128
ENDIF
STR R2
GHI RC
SD
BNF DSP_Exit
LDN RF ; load the next byte of the sprite into RB.0
PLO RB
LDI 00H ; set RB.1 to OOH
PHI RB
DEC RD ; decrement the sprite's byte counter
INC RF ; increment the pointer to the sprite's bytes
GHI RE ; prepare the shift counter
PLO RE
DSP_ShiftLoop: GLO RE ; exit the loop if all shifts have been performed
BZ DSP_ShiftExit
DEC RE ; decrement the shift counter
GLO RB ; shift the values in RB
SHR
PLO RB
GHI RB
RSHR
PHI RB
BR DSP_ShiftLoop
DSP_ShiftExit: SEX RC ; store the shifted bytes in the video buffer
GLO RB
XOR
STR RC
INC RC
GHI RB
XOR
STR RC
SEX R2
GLO RC ; advance the video buffer pointer to the next line
ADI 07H
PLO RC
GHI RC
ADCI 00H
PHI RC
BR DSP_ByteLoop
DSP_Exit INC R2
SEP R5
;------------------------------------------------------------------------------------------
Sent from my BatComputer via HAL 9000 and M5
modified 16-Nov-13 23:56pm.
|
|
|
|
|
Yup.. That's the stuff.
Will Rogers never met me.
|
|
|
|
|
Ahh, good morning (at leat it is early morning here). I got this drivel from here[^].
While I don't enjoy JavaScript very much, I still have some assembly which I occasionally work on. The code I have posted is used to draw a bitmap patten at any screen coordinates. I use it for text output, but also can be used to draw sprites in a game. That's why ther also collison detection.
Sent from my BatComputer via HAL 9000 and M5
|
|
|
|
|
CDP1802 wrote: allows any {place insulting word of choice here]
I believe that code block is not properly closed. I don't think you would want to debug that kind of error in a Javascript file...
This isn't a signature
|
|
|
|
|
Andrei Straut wrote: I believe that code block is not properly closed For a computer compiler probably, but even there you could code "{]" or "[}" as a pair of opening and closing braces.
|
|
|
|
|
I think that's why I like JS so much - it reminds me of the C64. However, I wouldn't use it for large applications, but scripts of a few hundred or thousand lines or so are fun to code in JS. I like OOP too, though I often think it's an overkill on simple scripts. I suppose as a hobbyist I don't have to deal with a hundred thousand lines plus of code, which would probably change my perspective.
|
|
|
|
|
Anybody's company planning to use it? Do you think it makes sense for teams of <=5 developers?
S. Somasegar's blog post[^]
The difficult we do right away...
...the impossible takes slightly longer.
modified 15-Nov-13 20:54pm.
|
|
|
|
|
|
Sorry. Modified OP.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Well I'm using half of what they consider to be Visual Studio Online (TFS services), and I greatly enjoy using the free TFS, its really changed the way I work and store code. Its very usable, simple, and keeps me organized.
Not sure if I'd do online code editing though, I do like IDE features.
|
|
|
|
|
Agreed. I signed up for the TFS online, but haven't put any of my projects into it yet.
I guess I'm afraid they will start charging one day.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
As of now it's free up to 5 developers. If you want to add more then you got to pay. I hope we can make use of it until they give it for free and hope it will be in future.
It's really a good thing to use say if a small group of individuals or freelancers working together in some projects.
Thanks,
Ranjan.D
|
|
|
|
|
My tin hat would shrink by a number of millimetres, personally I'm way too paranoid to have any of my day to day tools anywhere but local. And the bank I work for is even more so - and I approve .
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Mycroft Holmes wrote: too paranoid to have any of my day to day tools anywhere but local.
I understand, believe me.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
I was wondering how long it would be before the cloud domino fell.
|
|
|
|
|
May I ask you to clarify what you mean?
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Sorry I guess that was quit cryptic, when Adobe went to the cloud with Photoshop there was a big outcry and I predicted that a lot of large companies would be offering the same. At least uSoft is giving the option of owning a copy also.
|
|
|
|
|
We (2 Users) are using TFS Online for over a year now, and it works just fine. No problems so far.
|
|
|
|
|
I can see a use for it as an online scratchpad that I can reference from anywhere, similar to how I use Google Docs. It will also be useful as an accompaniment to my Pluralsight training subscription as I can try out code as I watch the videos and then continue, as and when, from wherever I happen to be - home or work. I currently use Cloud 9 in this manner.
I've watched a few of the videos and it does look very slick. I have a login but haven't gotten round to exploring it yet.
I can't see a scenario for doing production work with it though, at least, not yet.
Kevin
|
|
|
|
|
Shall we start the count down clock for when the security of someone's project gets compromised? Or the server crashes and takes all their source code and the backups were broken?
|
|
|
|
|
Richard Andrew x64 wrote: Anybody's company planning to use it? Do you think it makes sense for teams of <=5 developers?
No and no. I prefer doing development that isn't relying on an Internet connection. The beach comes to mind.
Marc
|
|
|
|
|
I'm already using it since the very first beta, it is great and it does remove all the problems associated with maintaining a server, backup, hardware failure, upgrades, electricity usage, rack space... all this is gone!
Out of the box you get free build servers (up to 60mins per month), you get free process templates (the Agile template is great!), discussion rooms, etc... downloading source code to your local workspace is actually quite fast (well if your broadband is decent) I never had any issue with having to wait.
I can understand that some people who are either are very worried about security, or request extremely fast data access, or have niche build requirements will still want to have their own server. But otherwise it does not make sense to keep using old fashion servers.
I'm a convert, I love it. I can't imagine going back to good old TFS and connecting to my office remotely using a cranky old VPN...
No way to make me go back.
|
|
|
|
|
Our company is definitively NOT planning to use it.
My boss and I share the opinion that EVERY network is inherently unreliable.
|
|
|
|
|
Happy birthday CodeProject! Clicky[^]
|
|
|
|
|
And there was much rejoicing.
|
|
|
|