Author Topic: NBA 68K  (Read 21335 times)

0 Members and 1 Guest are viewing this topic.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
NBA 68K
« Reply #60 on: September 25, 2007, 02:20:00 am »
glad you like it! :Dbiggrin.gif
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline Halifax

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1334
  • Rating: +2/-1
    • View Profile
    • TI-Freakware
NBA 68K
« Reply #61 on: September 25, 2007, 08:56:00 am »
Coding has commenced on NBA 68K

Just curious, because after I finished these vector algorithms I realized I suck at 68K ASM. :Ptongue.gif So can anyone spot any optimizations on this?

c1-->
CODE
ec1
vec2w vec2w_new(u16 x, u16 y)
{
 
There are 10 types of people in this world-- those that can read binary, and those that can't.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
NBA 68K
« Reply #62 on: September 25, 2007, 09:02:00 am »
wow 68k asm looks so different than z80 asm. Glad to see coding started tho ^^
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Liazon

  • Guest
NBA 68K
« Reply #63 on: September 25, 2007, 12:51:00 pm »
indeed, afaik, a lot more instructions, and all registers are basically and functionally the same.

which also means room for insane optimizing.

Offline Halifax

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1334
  • Rating: +2/-1
    • View Profile
    • TI-Freakware
NBA 68K
« Reply #64 on: September 25, 2007, 02:37:00 pm »
Yeah, that is one thing I love about the 68K. Plus it is just as easy, if not easier, to write assembly for the 68K as with the z80.
There are 10 types of people in this world-- those that can read binary, and those that can't.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
NBA 68K
« Reply #65 on: September 25, 2007, 02:52:00 pm »
i didnt liked how every z80 line of code seemed like number junk or acronyms  
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline bfr

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 819
  • Rating: +4/-0
    • View Profile
    • bfr's website
NBA 68K
« Reply #66 on: September 25, 2007, 03:01:00 pm »
Cool.

Using the inline assembler seems to be annoying, having to have a tab preceding each instruction and a "\n" after each instruction.  Also, what does the instruction "mulu" do?  I've never seen that before.  o.oblink.gif

Liazon

  • Guest
NBA 68K
« Reply #67 on: September 26, 2007, 10:31:00 am »
QuoteBegin-DJ Omnimaga+25 Sep, 2007, 20:52-->
QUOTE (DJ Omnimaga @ 25 Sep, 2007, 20:52)
i didnt liked how every z80 line of code seemed like number junk or acronyms  

 actually, i think that's how most assembly usually is.

but the way he's writing it it out now is pseudo-C-ish.  He's writing functions w/ inline ASM.  The inputs are simply which registers stuff gets loaded into before the subroutine/function runs.  All he needs to do is manipulate the register and return a value... I think.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
NBA 68K
« Reply #68 on: September 26, 2007, 11:36:00 am »
ah i see, his way is more readable tho
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline Halifax

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1334
  • Rating: +2/-1
    • View Profile
    • TI-Freakware
NBA 68K
« Reply #69 on: September 26, 2007, 01:15:00 pm »
Hmm I actually wouldn't say my way is more readable than z80.

@bfr: mulu stands for MUltipLy Unsigned which is the conjugate to muls

@Liazon: Basically, except nothing is inserted around my code because I follow standards. d0,d1,d2,a0,a1 are all throw away registers which means that you should never count on those registers ever being saved. If I didn't follow the standards, then yeah it would probably generate some push's and pop's (move)

Either way I could have just put those into '.s' files and included them in the build, but I like inline assembly better because it is easier to maintain.
There are 10 types of people in this world-- those that can read binary, and those that can't.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
NBA 68K
« Reply #70 on: September 26, 2007, 01:33:00 pm »
well i mean the instructions aren't two letters long, liek z80 asm. I still cant remember by heart what each one means. It's like if BASIC was like this:

CH
DP "Hello
PA "Press Enter
CH
WH 1
GK->Z
IF Z=45
TH
ST
End
....etc...

instead of the current form

Clearhome
Display "Hello
Pause "Press Enter
Clearhome
While 1
Getkey->Z
If Z=45
Then
Stop
End
....etc...
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline Halifax

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1334
  • Rating: +2/-1
    • View Profile
    • TI-Freakware
NBA 68K
« Reply #71 on: September 26, 2007, 03:19:00 pm »
Haha. Yeah I know what you mean, but I like z80 assembly compared to PS3 SPU assembly like:

mpyhhau
shlqbybi

:)smile.gif

The first person to figure out what those two instructions mean for PS3 SPU Assembly will be one of a limited few to receive the NBA 68K demo. ;)wink.gif

So be the first!(The information is readily available on the Internet. You just need to know the right place to look.)
There are 10 types of people in this world-- those that can read binary, and those that can't.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
NBA 68K
« Reply #72 on: September 26, 2007, 04:15:00 pm »
I assume PS3 asm is japaneese? O_Oshocked2.gif
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Liazon

  • Guest
NBA 68K
« Reply #73 on: September 26, 2007, 06:14:00 pm »
http://train.psp3d.com/downloads/PS3/PDFs/CBE/SPU_assembly_language_v13.pdf

QUOTE
mpyhhau rt, ra, rb
Multiply high high unsigned and add. The unsigned 16 most significant bits
of the word elements of registers ra and rb are multiplied, and the 32-bit
products are then added to the corresponding word elements of register
rt, and the sums are placed in register rt.


QuoteBegin
-->
QUOTE
shlqbybi rt, ra, rb
Shift left quadword by bytes from bit shift count. The contents of register ra
are shifted left by the number of bytes specified by bits 24 to 28 of word
element 0 of register rb. The result is placed in register rt.


Why instructions have to be so esoteric is a wonder.  Oh well.  Didn't see any registers so I guess it's more like:

ra*rb + rt -> rt
ra*2^rb -> rt

which ends up being ra*2^rb -> rt anyways.

@xlibman:  I wonder if you could change the instructions by changing the table file the assembler uses.  At the very least, I think it'd be neat if you could simply use #define to change everything.  But ya 68k and x86sem to be more straight forward in terms of naming.  Except i don't think i remember what lea, if that's an instruction stands for.

Regardless, I think the z80 ASM community has come a long way for sure :)smile.gif

Offline Halifax

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1334
  • Rating: +2/-1
    • View Profile
    • TI-Freakware
NBA 68K
« Reply #74 on: September 27, 2007, 08:29:00 am »
No PS3 assembly isn't in japenesse since it is based off of PowerPC instructions. But yes I love 68K, x86, and PowerPC assembly.

@Liazon: Great job! You will be one of the lucky few to recieve the NBA 68K beta.(More contests to come) And yes 'lea' is an instruction which stands for 'Load Effective Address'

P.S. Yes you can simply change the name of the instruction in the table file(.tab)

Basically Liazon those are all just defines, and you could do it that way although it may increase your compile time by like .0001 seconds :Ptongue.gif It won't be that much slower because defines are second-level to assembler instructions which means it searches assembly instructions first, and then defines. It does this all with binary search too(This is based off of SPASM source)
There are 10 types of people in this world-- those that can read binary, and those that can't.