View unanswered posts | View active topics It is currently Thu Feb 21, 2019 8:03 pm



This topic is locked, you cannot edit posts or make further replies.  [ 38 posts ]  Go to page 1, 2  Next
What can I do to help with Loongson support? 
Author Message
Rookie
User avatar

Joined: Sat Feb 07, 2009 2:59 pm
Posts: 17
Location: Chaoyang District, Beijing, China
Reply with quote
Post What can I do to help with Loongson support?
There are already five laptops out with the Loongson 2F CPUs. While I don't except any of them will ever be able to run bsnes (unless you make that speed-friendly version), the Loongson 3 due out next year might be able to.

The instruction set will be the same, with the 3 also supporting x86 translation. Even with 8 cores, I don't except 32bit x86-to-64bit mips3 translation to be friendly to bsnes given its already hgih emulation demands.

If I can provide any information to help with getting bsnes ready to compile on the 2F, it should be useful so bsnes will work on the Loongson 3 when that chip is released. Am I wrong to assume an 8-core 64-bit risc at 1.4 GHz will probably be able to run bsnes?

I know I'm probably your only contact with access to Loongson hardware unless you've been chatting with RMS, so I'll do what I can to help though I know it will never be running full (or half) speed here.

By the way, how can I get ahold of bearoso to let him know snes9x-gtk cannot compile on a Loongson even with assembler hacks off?


Mon Feb 09, 2009 9:32 am
Profile ICQ WWW
Hazed

Joined: Tue Feb 07, 2006 11:02 am
Posts: 76
Reply with quote
Post Re: What can I do to help with Loongson support?
D-- wrote:
Am I wrong to assume an 8-core 64-bit risc at 1.4 GHz will probably be able to run bsnes?

Well, the eight cores won't help, and I don't think bsnes has been ported to any fundamentalist RISC architectures (even older versions of bsnes struggled on my 1.6GHz PowerPC G5, but I don't know if that was just OS X being piggish.

Quote:
By the way, how can I get ahold of bearoso to let him know snes9x-gtk cannot compile on a Loongson even with assembler hacks off?

He's pretty responsive to posts in his thread in the SNES9x forums.


Mon Feb 09, 2009 9:49 am
Profile
Rookie
User avatar

Joined: Sat Feb 07, 2009 2:59 pm
Posts: 17
Location: Chaoyang District, Beijing, China
Reply with quote
Post 
Just providing the information. byuu and I talk regularly and he has mentioned an interest in Loongson support. I just wanted to get this down somewhere public so there would be more people providing input than our two-man AIM chats.


Mon Feb 09, 2009 11:10 am
Profile ICQ WWW
Regular
User avatar

Joined: Tue Mar 07, 2006 10:32 am
Posts: 347
Location: The Netherlands
Reply with quote
Post 
Eight cores would be enough to dedicate a core to each component of the SNES, I expect. But it's all about the speed of synchronisation between the cores.. if it can't sync up the millions of times per second bsnes needs, all its cores will mean nothing. (of course, in its current form bsnes can't handle more than one physical core anyway)


Mon Feb 09, 2009 11:12 am
Profile
Reply with quote
Post 
Quote:
If I can provide any information to help with getting bsnes ready to compile on the 2F, it should be useful so bsnes will work on the Loongson 3 when that chip is released.


Appreciate the help.

The only non-ISO C++ portion of bsnes is libco, which amounts to ~1-2kb of code per platform that has to be written in assembler.

I would be very interested in porting libco to the MIPS architecture, but it's going to be very tough without having access to one.

Even for the x86, it took me ~50 or so compile tries to get it working there. I think if we were to do this, I'd need a shell account on your Loongson. I would also need the full instruction set reference, and ABI (application binary interface) convention for Loongson/Linux.

Or perhaps someone here is familiar with the MIPS architecture? The Loongson is extremely similar, they just didn't buy the license themselves, instead going through a Canadian company, IIRC.

Quote:
Am I wrong to assume an 8-core 64-bit risc at 1.4 GHz will probably be able to run bsnes?


It's a possibility. My 1.8GHz Pentium Dual-Core (half-cache Core 2) was capable of ~60-70fps. If the MIPS architecture is more efficient, it could work. Note that the Atom in-order CPU in other netbooks gets ~40fps now.

Otherwise, the eight-core part is really promising. Right now, VG is right that I can only use one thread.

But if a platform had really tight thread synchronization (~50-100x faster than on x86), then I could indeed use one core per emulated chip. In theory, that would give me enough power for even SuperFX / SA-1 support, or a dot-accurate PPU.

The entire libco architecture was designed with this in mind. Though it's coöperative for now, it really only needs to replace co_switch(dest) with dest->lock = true; co_waitfor(dest->lock == false); and it will be truly multi-threaded.

PCs though, they only have 2-4 cores (I need at least 4 of my own), and I can only sync two threads ~100k times a second, versus the ~10 million I'd need, and that's just for syncing without any actual emulation.

Eight cores is really promising ... I'll have to look into ordering one when they come out, perhaps.


Mon Feb 09, 2009 5:20 pm
Reply with quote
Post 
longson... isn't that the new chinese CPU that's getting a lot of attention lately? It's a 32-bit MIPS processor, right?
EDIT:
Yes, I remember now. Derrick Sobodash talked about it on his website:
http://cinnamonpirate.com/2009/01/enter ... on-laptop/


Mon Feb 09, 2009 7:33 pm
Reply with quote
Post 
Good news, SJLJ libco works on the MIPS Loongson 2F. Meaning bsnes will work, however slowly we do not know. Way to go, Nach!!

Code:
~/libco/test$ ./test_timing
context-switching timing test

0.140 seconds per  50 million subroutine calls (5000000 iterations)
2.180 seconds per 100 million co_switch  calls (5000000 iterations)
co_switch skew = 15.571429x


That makes me ~70% certain that it will work on the PS3 as well.


Mon Feb 09, 2009 8:49 pm
Rookie
User avatar

Joined: Sat Feb 07, 2009 2:59 pm
Posts: 17
Location: Chaoyang District, Beijing, China
Reply with quote
Post 
ZH wrote:
longson... isn't that the new chinese CPU that's getting a lot of attention lately? It's a 32-bit MIPS processor, right?
EDIT:
Yes, I remember now. Derrick Sobodash talked about it on his website:
http://cinnamonpirate.com/2009/01/enter ... on-laptop/

Hi to you, too. I guess you didn't check my profile. The Loongson 2F is a 64-bit MIPS-compatible CPU, though it has its own instructions in addition to MIPS. It's significant for drawing only 4W at 1GHz which is amazing for a chip made on a 90nm process. It also has an on-chip northbridge included int hat figure, putting it far below the power consumption of an Intel Atom which relies on a power-wasting VIA northbridge.

byuu wrote:
Good news, SJLJ libco works on the MIPS Loongson 2F. Meaning bsnes will work, however slowly we do not know. Way to go, Nach!!

Code:
~/libco/test$ ./test_timing
context-switching timing test

0.140 seconds per  50 million subroutine calls (5000000 iterations)
2.180 seconds per 100 million co_switch  calls (5000000 iterations)
co_switch skew = 15.571429x


That makes me ~70% certain that it will work on the PS3 as well.


Is SJLJ in the latest bsnes source package? If so I'll try compiling it later tonight. Snes9x-gtk I'm done with until BearOso makes some big changes. Four hours of work to make it link, then discovering it had no sound output or video output with any combination of settings was disappointing, especially since those were the few areas that didn't have trouble building :( Maybe I'll try it again with absolutely no gcc optimizations to see if it's even possible.

But you are really going to need a MIPS assembler core if you want to bring that sync speed down. I'm not sure the Loongson3 will offer a big enough speed jump to overcome that delay, and if you're talking about syncing multiple cores ... it could get pretty hairy I would think.

On the up side, you have an Xv display which should help a lot. SDL's refusal to hook an Xv port is one of the things crippling mednafen on the Loongson right now. After profiling it almost has enough power for the GBA, assuming no software scaling and a big sound buffer. SDL sound has some problems too :(

Side note: I have bview, tsukuyomi and xkas packaged for Loongson. Is there anything else you want me to build besides bsnes?


Tue Feb 10, 2009 10:51 am
Profile ICQ WWW
Reply with quote
Post 
Quote:
Hi to you, too. I guess you didn't check my profile. The Loongson 2F is a 64-bit MIPS-compatible CPU, though it has its own instructions in addition to MIPS. It's significant for drawing only 4W at 1GHz which is amazing for a chip made on a 90nm process. It also has an on-chip northbridge included int hat figure, putting it far below the power consumption of an Intel Atom which relies on a power-wasting VIA northbridge.

Oh, you're Derrick Sobodash? Well, hey there :)

I didn't really know the exact details. I read through some of your posts on cinnamonpirate, albeit quickly from time to time; I got the impression that the loongson 2F is a 32-bit MIPS cpu. So, it's 64-bit and has it's own instruction set: what's the name of this instruction set? Aside from it being MIPS-compatible.


Tue Feb 10, 2009 12:47 pm
Rookie
User avatar

Joined: Sat Feb 07, 2009 2:59 pm
Posts: 17
Location: Chaoyang District, Beijing, China
Reply with quote
Post 
Let's think about this:

The instruction set of the 6502 is the 6502 instruction set.
The instruction set of the Z80 is the Z80 instruction set.
The instruction set of the 68000 is the 68000 instruction set.
The instruction set of the 486 is the x86 instruction set.
The instruction set of the MIPS is the MIPS instruction set.

Would you like to try guessing again what the instruction set of the Loongson is?


Tue Feb 10, 2009 5:47 pm
Profile ICQ WWW
Lurker

Joined: Wed Jul 28, 2004 1:35 am
Posts: 128
Reply with quote
Post 
ZH wrote:
I didn't really know the exact details. I read through some of your posts on cinnamonpirate, albeit quickly from time to time; I got the impression that the loongson 2F is a 32-bit MIPS cpu. So, it's 64-bit and has it's own instruction set: what's the name of this instruction set? Aside from it being MIPS-compatible.


MIPS-III.


Tue Feb 10, 2009 6:26 pm
Profile ICQ YIM
Reply with quote
Post 
D-- wrote:
Let's think about this:

The instruction set of the 6502 is the 6502 instruction set.
The instruction set of the Z80 is the Z80 instruction set.
The instruction set of the 68000 is the 68000 instruction set.
The instruction set of the 486 is the x86 instruction set.
The instruction set of the MIPS is the MIPS instruction set.

Would you like to try guessing again what the instruction set of the Loongson is?

<|>_<_>_<|>
Let me guess, the Spoony-bard instruction set?


Tue Feb 10, 2009 6:48 pm
Inmate

Joined: Thu Jan 11, 2007 4:28 am
Posts: 1485
Location: Salem, Oregon
Reply with quote
Post 
good to see you around D.

_________________
byuu wrote:
Seriously, what kind of asshole makes an old-school 2D emulator that requires a Core 2 to get full speed? >:(


Tue Feb 10, 2009 8:15 pm
Profile WWW
Rookie
User avatar

Joined: Sat Feb 07, 2009 2:59 pm
Posts: 17
Location: Chaoyang District, Beijing, China
Reply with quote
Post 
Well, compiled and profiled. bsnes gets a peak of 23 fps on the Loongson 2F at 796MHz and an average of 18 fps. I did not try it with the CPU overclocked to its maximum speed of 1GHz.

The most interesting point is that the Xv driver works how it should, with absolutely no speed penalty no matter how you scale it. If mednafen adds support for this driver, it will have full speed on every system except PC-FX. Currently it can only achieve this with no scaling, meaning no possibility of full-screen gaming.


Tue Feb 10, 2009 8:16 pm
Profile ICQ WWW
Locksmith of Hyrule
User avatar

Joined: Sun Aug 08, 2004 7:49 am
Posts: 3634
Location: 255.255.255.255
Reply with quote
Post 
D-- wrote:
Let's think about this:

The instruction set of the 6502 is the 6502 instruction set.
The instruction set of the Z80 is the Z80 instruction set.
The instruction set of the 68000 is the 68000 instruction set.
The instruction set of the 486 is the x86 instruction set.
The instruction set of the MIPS is the MIPS instruction set.

Would you like to try guessing again what the instruction set of the Loongson is?


Eh, it's just Franky

don't worry about him

_________________
Image
<Nach> so why don't the two of you get your own room and leave us alone with this stupidity of yours?
NSRT here.


Tue Feb 10, 2009 8:27 pm
Profile YIM WWW
Gecko snack

Joined: Sun Aug 21, 2005 11:06 am
Posts: 2372
Location: Australia, QLD
Reply with quote
Post 
Why did Franky change username? to "somehow" hide away from all the negativity he has gotten ever since joining here?

_________________
Core i7 920 @ 2.66GHZ | ASUS P6T Motherboard | 8GB DDR3 1600 RAM | Gigabyte Geforce 760 4GB | Windows 10 Pro x64


Wed Feb 11, 2009 2:34 am
Profile WWW
Reply with quote
Post 
franpa wrote:
Why did Franky change username? to "somehow" hide away from all the negativity he has gotten ever since joining here?

Fuck you. I just wanted a better name, and ZH sounded cool.
Like I give a shit what you guys think of me anyway.


Wed Feb 11, 2009 2:53 am
Trooper

Joined: Wed Mar 01, 2006 8:47 pm
Posts: 550
Reply with quote
Post 
ZH = Chinese

_________________
Have a nice kick in da nutz @~@* c//


Wed Feb 11, 2009 3:10 am
Profile
NO VOWELS >:[
User avatar

Joined: Sun Aug 31, 2008 12:59 pm
Posts: 753
Location: ALABAMA
Reply with quote
Post 
he says it means Zero Hero

but yeah ZH is for Chinese, lol

in after TL Note


Wed Feb 11, 2009 3:48 am
Profile YIM WWW
Rookie
User avatar

Joined: Sat Feb 07, 2009 2:59 pm
Posts: 17
Location: Chaoyang District, Beijing, China
Reply with quote
Post 
ZHongwen.

And stop derailing my damn thread :(


Wed Feb 11, 2009 5:19 am
Profile ICQ WWW
Buzzkill Gil

Joined: Wed Jan 12, 2005 7:14 pm
Posts: 4231
Reply with quote
Post 
D-- wrote:
ZHongwen.

And stop derailing my damn thread :(

I'd just like to say you have the best avatar ever, before this gets back on track.


Wed Feb 11, 2009 5:41 am
Profile
Locksmith of Hyrule
User avatar

Joined: Sun Aug 08, 2004 7:49 am
Posts: 3634
Location: 255.255.255.255
Reply with quote
Post 
kick wrote:
Franky is a weeaboo


Fixed, also explains a lot..

_________________
Image
<Nach> so why don't the two of you get your own room and leave us alone with this stupidity of yours?
NSRT here.


Wed Feb 11, 2009 5:59 am
Profile YIM WWW
"God"

Joined: Tue Jul 27, 2004 11:24 pm
Posts: 1128
Reply with quote
Post 
adventure_of_link wrote:
kick wrote:
Franky is a weeaboo


Fixed, also explains a lot..


you have no clue what a weeaboo is do you?

_________________
Does [Kevin] Smith masturbate with steel wool too?

- Yes, but don’t change the subject.


Wed Feb 11, 2009 6:15 am
Profile
NO VOWELS >:[
User avatar

Joined: Sun Aug 31, 2008 12:59 pm
Posts: 753
Location: ALABAMA
Reply with quote
Post 
funkyass wrote:
adventure_of_link wrote:
kick wrote:
Franky is a weeaboo


Fixed, also explains a lot..


you have no clue what a weeaboo is do you?


Derail; AoL postcount + butar > your postcount

Rerail; Where would one obtain one of these processors and in what environment would it be found suitable, I never get to work much outside an x86 environment and I'm terribly interested!


Wed Feb 11, 2009 7:28 am
Profile YIM WWW
Rookie
User avatar

Joined: Sat Feb 07, 2009 2:59 pm
Posts: 17
Location: Chaoyang District, Beijing, China
Reply with quote
Post 
At the moment you would need to contact Lemote. You might also look into the Beijing Linux Users Group. The vice president Pockey Lam and some of the other members work for the company producing the Gdium, which is more targeted toward foreign users (Lemote offers NO English support). Your current options are:

In Production:
Yeeloong 8089a (2G SSD, 512M RAM, SM712 video, 2 USB ports)
Yeeloong 8089b (160G HD, 1G RAM, SM712 video, 3 USB ports, webcam that doesn't work)

Pre-Production:
Gdium (16G "G-Key" [USB flash on which the OS is stored, slides seamlessly into a socket under the touchpad], 512M RAM, SM502 video)

There is also the E-benton, though I'm told they royally fucked Lemote and never paid them for all the technology they borrowed. Chances are you won't see many more of their computers.

For a full desktop system instead of a netbook, there is the Fulong 2F box. It comes with an 80G hard disk and 512M RAM. Too many ports to list. Built to be the same size as a CD-ROM USB enclosure, requires a keyboard, mouse and monitor.

These all cost between $210 and $500. Mine (the 8089a) was $300.


Wed Feb 11, 2009 8:22 am
Profile ICQ WWW
Display posts from previous:  Sort by  
This topic is locked, you cannot edit posts or make further replies.   [ 38 posts ]  Go to page 1, 2  Next

Who is online

Users browsing this forum: No registered users and 1 guest


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

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software.