Jump to content

Photo

Scrolling Color Demo for HyperScan


42 replies to this topic

#26 selgus OFFLINE  

selgus

    Moonsweeper

  • 333 posts
  • Location:Orlando, Florida

Posted Fri Apr 24, 2009 4:48 AM

Another HS programmer is always welcome :) Right now, it is only me and ppcasm.

Well if it is very 'MIPS-like' then when I take a look at the HS, I will port my N64 water splash effect to it. It doesn't make any special use of the N64 RSP/RDP and just needs frame buffer access.

Just got to see how different these op-codes really are. :)
--Selgus

#27 nathanallan OFFLINE  

nathanallan

    Quadrunner

  • 5,640 posts
  • Location:Nashville, TN

Posted Fri Apr 24, 2009 9:44 AM

tears_of_ash and wickey is also in on it, forgot to credit there. Not sure :?: I just woke up and am working on my first cup of coffee.

Do you have any of the game disks to look at?

Edited by nathanallan, Fri Apr 24, 2009 9:45 AM.


#28 Wickeycolumbus OFFLINE  

Wickeycolumbus

    Red Sea Crosser

  • Topic Starter
  • 5,162 posts
  • Location:Michigan

Posted Fri Apr 24, 2009 12:44 PM

tears_of_ash and wickey is also in on it, forgot to credit there. Not sure :?: I just woke up and am working on my first cup of coffee.



:? Wasn't I the one that posted the demo?

What exactly do you mean by 'in on it' anyway? Was it not ppcasm that got homebrew code running?


Do you have any of the game disks to look at?


The commercial games are irrelevant to the situation.

Edited by Wickeycolumbus, Fri Apr 24, 2009 1:00 PM.


#29 nathanallan OFFLINE  

nathanallan

    Quadrunner

  • 5,640 posts
  • Location:Nashville, TN

Posted Fri Apr 24, 2009 7:57 PM

Sorry! We have all contributed. I posted a hello world mainly cause I was pretty excited about it, you also posted up a demo iirc, ppcasm wrote the demo I showed and another showing door open/door closed. I was just waking up when I posted that up there, now I'm beat from working on an air conditioner :) Plese, correct me if I am wrong.

The commercial games are pretty much irrelevant. PM soon about that little part.

#30 ppcasm OFFLINE  

ppcasm

    Combat Commando

  • 9 posts

Posted Sat Apr 25, 2009 3:50 AM

You know, in 30 years, we're all going to be sorry we didnt get one. Since it failed so miserably it *might* be worth a lot later...... :ponder:


Don't you worry, I am prepared for the situation. I have over 12 systems (6 sealed!) and am waiting for the prices to skyrocket :grin:

You're a nut! :)

Though I do want to learn more about this machine. If it was such a failure because a lack of any real software, I wonder what you can do with the hardware? I put it on my backlog to look at moving the one game I am working on, over to the HS when I know more about it.

I am assuming that the frame buffer is memory mapped into normal address space, and what people are doing now is similar to what they were doing when hacking the N64 (i.e. doing software rendering into the frame buffer and minimal hardware setup).

if it is MIPS-like, then it should be pretty easy to pick up. Having done a lot of PSX/PS2/N64 assembly level programming, this shouldn't be that hard. Does it have the same load/store RISC arch, 32 general purpose registers, pipeline stalls if the stage isn't ready at the time of execution, etc?

Some people must know more than they are saying out there. :)
--Selgus



I would say its about 60-70% mips based or so, yes 32 general purpose registers, risc like load and store arch, but oddly with some extentions like push and pop instructions for stack operations and such, and the register convention(at least partaining to c) isnt the same, such as mips r0 being hardwired to be zero, whereas on spg290 its actually the stack pointer, as far as the pipeline stall goes, I have made it a habit either way to use a few nops just in case, although there does seem to be a pflush instruction, sometimes i use that when using control register instructions and such, and yes, right now were just using the framebuffer(which is mapped to memory/configurable), the idea I used to get text was the same as what most systems use when their video only has graphics mode and no text mode where you create a fontmap and have the characters bitmapped to the framebuffer, there is a few modes that can be set video wise in terms of color layout and such, but i deemed it easier to just set rgb565 mode, which is what most the games were using. There has been alot of work put into this thing, the only real thing left is figuring out the controllers, which I have not had time to do sadly, hopefully soon. I also hope I can talk wickey into not being such a masochist and try picking up C, that boy loves assembly. :P

#31 ppcasm OFFLINE  

ppcasm

    Combat Commando

  • 9 posts

Posted Sat Apr 25, 2009 4:34 AM

Also, there is no documentation _AT ALL_ except a mnemonics list that came with a sunplus IDE, which I got from unsp.com(not sure of its legality, I just found it a few weeks ago, it was the only english thing on the entire site), other than that there is no programming documentation, no hardware documentation, just the list of instructions and what flags and registers they manipulate and such, and the official IDE doesnt give any advantage to the gcc/binutils port, which was a whole other headache in itself. I'll try to give some description of what really went on behind the scenes, the first thing I found s+core wise was some (seemingly) uncommited binutils patch that was supposed to add score support to binutils. I thought it was uncommited as it was broke all to hell , it had to be applied manually, and the port maintainers didnt seem to happy of the idea that some mips specific things were still left in the "patch"(which wasnt really a patch so much as a verbal description of what they needed to do...............el oh el) so, after applying all said stuff, to no avail, I decided to just look through the patch code, knowing somewhere in the code there would be an opcode table, found it, and the information i needed that would allow me to write an assembler, then I started working on one. At about that time I happened to be looking at some binutils stuff and realized i didnt have a new version of the binutils code, so when i got it it hit me that, maybe in the time the guy that posted the patch(I do believe his name was liquin) that he couldve very well fixed up the patch where they would submit it to be officially added to binutils, so, knowing how to compile cross compile toolchains i set it to go for target 'score' and voila, i did some running and jumping(j/k) it actually worked(well, still broken in the sourcecode, but it was an easy fix that had to do with string literals i believe) but, at that point i had a working binutils, so, i went off and started using the created score-objdump on all the commercial games hyper.exe file, which at this point i had already knew was the main executable started on all disc's, thats when the longgggggggggggggg headache started of figuring out how this thing worked, little by little, mainly using a game called IWL as a testbed because i had realized it had another binary that got launched from its hyper.exe, and the launched binary didnt have checksummed headers and all that other jazz to add to an already complicated matter, lots of work, headache, all that stuff, worked with wickey, brainstomed more, and by this point had already realized that gcc also had a score port also, up to this point the only way i knew what the instructions did was because they were mostly mips type mnemonics , and seemed to have the same usage , other than some minor differences in denoted 16bit and 32bit instructions, fast forward some more, then i was at the point where i hardly had any code running, just some modified game code and that was it, i realized i could write a standalone hyper.exe with no ties to commercial game code, but i couldnt run any c compiled programs, and unlike wickey, im not insane :P, I just couldnt see myself building on more progress doing all this stuff in assembly , and some memory addressing problems caused c not to be able to be used, not even position independently. later on i did some very odd things and figured out how to overcome the addressing problem, then I had c running, at that time i also finally got the screen to clear, then it was finally time to make something worth while, so I had everything i needed at that point to write the hello world. A few weeks ago i ran across the unsp.com site that had the official S+core IDE, it comes with an IDE, and a document with the assembly mnemonics and what the instructions do, its rather useless and doesnt give you any benefits to the free/opensource cross compiler environment you get with binutils/gcc, in fact, its the exact same thing on the backend, and as im not sure of its legality, my guess is they had to release it because they would be breaking gpl because the official IDE uses the same gcc and binutils that you get off the internet, otherwise there is no spg290 documentation at all, iv had a couple of questions about the IDE, as if it is some magic guiding light force in the world of hyperscan, i can promise you, it isnt :) . in fact, if it was, im sure you would be seeing more right now than just some simple graphics demos and cd door checkers, which also had to be reverse engineered using the text output to dump some hardware registers. to figure out what gpio bit did this function so, if anyone wants to know how to program for this thing let me or wickey know, for starters the official IDE is at unsp.com, good luck, but, if you want the always great gcc/binutils, get the newest source from their websites and set the cross compile target up as score. I cant help you with the official IDE since noone uses it, but if you need the files to get the gcc/binutils cross compiler compiling hyperscan code, i would be glad to help :P.WHEW, thanks everyone

#32 roland p OFFLINE  

roland p

    River Patroller

  • 2,455 posts
  • $23
  • Location:The Netherlands

Posted Sat Apr 25, 2009 4:56 AM

Great work! It sounds like reverse enginering the rosetta stone :)

Can the usb port used to transfer homebrews to it, or is this just wishful thinking at this stage?

Edited by roland p, Sat Apr 25, 2009 4:57 AM.


#33 ppcasm OFFLINE  

ppcasm

    Combat Commando

  • 9 posts

Posted Sat Apr 25, 2009 6:21 AM

Great work! It sounds like reverse enginering the rosetta stone :)

Can the usb port used to transfer homebrews to it, or is this just wishful thinking at this stage?


not yet, there is a working cd-rw potentiometer mod on the cd drive though, which was a blessing, I assume only developers would use it at the moment, it really saves on using cd-r's , and its a really easy mod, luckily we can write in c, and c is portable if you write code correctly, the trick I have been using is writing non system specific code, only relying on a framebuffer and its value being global, then I use SDL to start a rgb565 , 640*480 framebuffer window on the pc and do all the graphical stuff from there, then its just a matter of recompiling the code with the score toolchain set up to create hyperscan binaries. Until we figure out the controller thats pretty much all we got, iv been dumping hardware registers onscreen to figure out more, but the process is still a pain in the arse, especially when added to my work/life schedule.

#34 selgus OFFLINE  

selgus

    Moonsweeper

  • 333 posts
  • Location:Orlando, Florida

Posted Sat Apr 25, 2009 6:57 AM

Also, there is no documentation _AT ALL_ except a mnemonics list that came with a sunplus IDE, which I got from unsp.com(not sure of its legality, I just found it a few weeks ago, it was the only english thing on the entire site)

I was looking on their site, where did you find the IDE? I wanted to see how much work it would take to port my assembly code over. Thanks.
--Selgus

#35 ppcasm OFFLINE  

ppcasm

    Combat Commando

  • 9 posts

Posted Sun Apr 26, 2009 2:52 AM

the IDE is here: http://files.filefront.com/13660559

#36 selgus OFFLINE  

selgus

    Moonsweeper

  • 333 posts
  • Location:Orlando, Florida

Posted Mon Apr 27, 2009 4:45 AM

the IDE is here: http://files.filefront.com/13660559

Thanks, I'll take a look at this.
--Selgus

#37 ppcasm OFFLINE  

ppcasm

    Combat Commando

  • 9 posts

Posted Mon Apr 27, 2009 3:24 PM

I probably did too much rambling in this post, but, im tired, so , here goes.

http://hyperscan.18....?...mp;f=5&t=97

#38 selgus OFFLINE  

selgus

    Moonsweeper

  • 333 posts
  • Location:Orlando, Florida

Posted Mon Apr 27, 2009 6:56 PM

Interesting, it is ARM-like, where it has 32-bit instructions, along with a 16-bit set (like Thumb). The synthetic instructions are very MIPS-like, so dealing with the processor won't be a big deal at all. The sticking point is the actual HS hardware, and it's register sets.

I guess I could disassemble one of the games and figure out what to hit and when, once I find some time, that is.
--Selgus

#39 ppcasm OFFLINE  

ppcasm

    Combat Commando

  • 9 posts

Posted Tue Apr 28, 2009 7:29 AM

Interesting, it is ARM-like, where it has 32-bit instructions, along with a 16-bit set (like Thumb). The synthetic instructions are very MIPS-like, so dealing with the processor won't be a big deal at all. The sticking point is the actual HS hardware, and it's register sets.

I guess I could disassemble one of the games and figure out what to hit and when, once I find some time, that is.
--Selgus



Its a SoC, all of the main hardware is internal to the chip, which takes away our ability to probe buslines and such that would normally connect to seperate components. The chip itself has a bunch of stuff, UART, i2c,, video, sound, usb, and some other stuffs, the only real thing thats HS specific is the controllers, the flashing l.e.d's(which iv already mapped out to which GPIO they are connected to), the cd tray door switch, and the rfid reader/writer, and maybe some custom things added to the main core, sunplus usually allows custom things to be added as they are needed, such as a floating point coprocessor, as i believe there has been one added, but im not sure yet, iv only used floating point on my 3d wireframe cube demo, and I used software floats on that, if it has been added, its been at the request of mattel because the original spg290 doesnt seem to have one..

#40 ppcasm OFFLINE  

ppcasm

    Combat Commando

  • 9 posts

Posted Tue Apr 28, 2009 12:03 PM

This describes the process of disassembling the commercial games
http://hyperscan.18....hp?showtopic=98

#41 MausGames OFFLINE  

MausGames

    Dragonstomper

  • 897 posts
  • Location:MO, USA

Posted Tue Apr 28, 2009 12:52 PM

WC, I have been following this since people starting talking about the HS here, and finding it for next to nothing at various stores. It's pretty exciting to see that there has been a lot of progress without hitting any brick walls yet, and a relief that some of the expected/dreaded walls didn't even exist!

What are the intentions though? Since I'm an NES guy, I'm always thinking in terms of 8-bit era platformers and puzzlers; do you think this will ever have some sort of homebrewed devkit that allows people to produce advanced games for it? It's worth noting that this would be the first wide release modern game system that could potentially allow programmers to produce and distribute a game in both digital and cd formats, without requiring any system modifications. Right, or am I missing some? Considering that the hardware is also extremely well suited to the kind of games usually produced post-market, I can see why you got interested about the HS despite it's released library.

As far as future worth, I really think that is dependent on homebrews and what you and others are doing right now, considering the released library; It's kind of relegated to the category with videonow/vtech/leapster type edutainment things that are all landfill immediately post-market. I can't imagine any interest in those sort of things further down the road, unless it's in documentaries with titles like Digital Pollution, that show the strange late 20th/early 21st century catch-22 of teaching our kids with electronics whose production and disposal destroy their environment. I always appreciate people who try to keep them useful, and out of the ground. :thumbsup:

Edited by MausGames, Tue Apr 28, 2009 1:03 PM.


#42 Wickeycolumbus OFFLINE  

Wickeycolumbus

    Red Sea Crosser

  • Topic Starter
  • 5,162 posts
  • Location:Michigan

Posted Tue Apr 28, 2009 1:20 PM

WC, I have been following this since people starting talking about the HS here, and finding it for next to nothing at various stores. It's pretty exciting to see that there has been a lot of progress without hitting any brick walls yet, and a relief that some of the expected/dreaded walls didn't even exist!

What are the intentions though? Since I'm an NES guy, I'm always thinking in terms of 8-bit era platformers and puzzlers; do you think this will ever have some sort of homebrewed devkit that allows people to produce advanced games for it? It's worth noting that this would be the first wide release modern game system that could potentially allow programmers to produce and distribute a game in both digital and cd formats, without requiring any system modifications. Right, or am I missing some? Considering that the hardware is also extremely well suited to the kind of games usually produced post-market, I can see why you got interested about the HS despite it's released library.

As far as future worth, I really think that is dependent on homebrews and what you and others are doing right now, considering the released library; It's kind of relegated to the category with videonow/vtech/leapster type edutainment things that are all landfill immediately post-market.


Once we get everything we need figured out (the controllers mainly), ppcasm I would like to port some emulators. As for the devkit, read ppcasm's post about HyperScan programming. You can get everything you need there :) The ability to run homebrew software out of the box is for sure a really good thing.

Edited by Wickeycolumbus, Tue Apr 28, 2009 1:26 PM.


#43 ppcasm OFFLINE  

ppcasm

    Combat Commando

  • 9 posts

Posted Tue Apr 28, 2009 2:42 PM

WC, I have been following this since people starting talking about the HS here, and finding it for next to nothing at various stores. It's pretty exciting to see that there has been a lot of progress without hitting any brick walls yet, and a relief that some of the expected/dreaded walls didn't even exist!

What are the intentions though? Since I'm an NES guy, I'm always thinking in terms of 8-bit era platformers and puzzlers; do you think this will ever have some sort of homebrewed devkit that allows people to produce advanced games for it? It's worth noting that this would be the first wide release modern game system that could potentially allow programmers to produce and distribute a game in both digital and cd formats, without requiring any system modifications. Right, or am I missing some? Considering that the hardware is also extremely well suited to the kind of games usually produced post-market, I can see why you got interested about the HS despite it's released library.

As far as future worth, I really think that is dependent on homebrews and what you and others are doing right now, considering the released library; It's kind of relegated to the category with videonow/vtech/leapster type edutainment things that are all landfill immediately post-market. I can't imagine any interest in those sort of things further down the road, unless it's in documentaries with titles like Digital Pollution, that show the strange late 20th/early 21st century catch-22 of teaching our kids with electronics whose production and disposal destroy their environment. I always appreciate people who try to keep them useful, and out of the ground. :thumbsup:


Yea, there was alot of walls to overcome, were in one right now, the controller is a world enigma for sure, I started a "devkit' that, due to people really not wanting to build a toolchain from source, is based around the sunplus ide, however there is nothing in the ide that helps with spg290, so a file was made in the skeleton called HSlib that im hoping people will add to when they figure stuff out, that will really be what makes or breaks the devkit as it is. _MOST_ programmers(i am going to be flamed for saying this here since this doesnt really apply to anyone in this community) love ease of programming tactics where someone else has written a library for them and they just drop it in and use it. My belief is the easier you make it on the programmer, the more programmers you get, therefore the more games you get, so hopefully the library will be full of fun things like easy to use sound lib, 2d graphics lib, library to handle controllers, and a bunch of other libraries that make things so simple that it will even make someone who isnt familiar with programming give it a shot. Advanced homebrew will surely come when we get something like that, and as all this is just now seeming to really catch on hopefully more interest will be looked into it from other people, if someone happens to find some cheap systems, like say $10 or something, can you let me know and we can work out a way for you to send me it? , gotta stock up, I need like 4 more, I have a feeling im not going to be able to afford one of these things when the price skyrockets and I need some backups in case something happens. :-/




0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users