Results 1 to 8 of 8

Thread: Programming experiment

  1. #1

    Default Programming experiment

    (Video at bottom of text).

    Hello. This is probably wayyy, wayyy too early and crappy looking to post about, but in case anyone is interested I would like to show a video of a system I am working on, and mention some of the ideas I have for it. Basically I wanted to play around with C++ some more after many years of mostly avoiding it and using other things like C# and Node.js. This gives me a chance to learn new C++ features and integrate easily with lots of stuff. Including libretro.

    I have been watching youtube channels like Lazy Game Reviews etc. and was jealous of the vintage computer collections. I made a few visits to eBay and local thrift shops and realized it was not going to be easy to run out and start grabbing a bunch of inexpensive vintage computers that actually worked. So instead of waiting for eBay stuff I decided to try to build a _virtual_ vintage computer collection.

    I have been building my own 3D Libretro front-end starting with Irrlicht Engine. The great thing about Irrlicht is that even though it is very old and not flashy, it has built in support to load several 3d model file formats. I figured out how to get MAME Libretro to load up with multiple cores running at the same time. This involves copying DLLs (lol) and some C++ templates, plus a few places that just need to be long lists of case options. Anyway I think its pretty cool being able to load up multiple MAME or other libretro cores at the same time. Obviously this has performance consequences so maybe is a bit of a gimmick in some circumstances, but it is cool. MAME is designed as a command line application and so as a libretro DLL is quite crashy. I hacked a bit on it so that I could just pass in normal MAME command lines. And after a lot of debugging to figure out where the files had to go, have been successful in loading up Coco2 and its cartridges as well as other MESS computers I tried (through my hacked MAME-libretro core).

    In order to make this a truly customizable system, I found an open source BASIC interpreter called My-Basic by Wang Renxin and modified it. To make it more retro, I added line numbers, enabled GOTO line number (still have to work on that). I also added a number of commands, like REZ to load a 3D model, LINE3D for 3D lines, and EMULATE to start emulating a libretro (including MAME) system.

    The demo looks like crap right now, I know. I have a lot of plans for features to add that will enable me to create a much, much more awesome demo. MAME has lua support built in. I plan to hack into my MAME-libretro core a hook into that lua script code, to run arbitrary lua script. With lua you can also read and write memory from MAME cores. So I will add a BASIC command that wraps around luascript to read and write mem, probably call it PEEK and POKE (like POKE SOME_EMULATOR, MEMADDR, BYTE or something). With this capability, it should be possible to do a number of things, such as having one MAME 80s computer controlling another one, or having a Spectrum assembly program outputting BASIC commands to draw and rotate 3D lines in my environment.

    I also plan to add in the PDFium library which is Chromium's PDF renderer, and set up a 3D book page flip thing so that I can import old computer manuals and display them. I also plan to add OpenVR support.


  2. #2
    Amateur Poster pix07's Avatar
    Join Date
    Jul 2016
    Location
    Poland
    Age
    27
    Posts
    110

    Default Re: Programming experiment

    for me very interesting bright idea you will use low system language asm or leve it as is
    https://github.com/pix07
    "God made the integers, all else is the work of man "- Leopold Kronecker

  3. #3

    Default Re: Programming experiment

    Well like I re-iterated in my reply to your PM, it is programmed in C++, which is fairly low-level. The customization language built in is Vintage BASIC, which I feel is quite retro and easy to use, and since its based on My-Basic, has some nice modern features like lambdas and object-oriented programming for people that want that. Then, as I mentioned in my post, I plan to add POKE and PEEK commands to Vintage BASIC, that can read memory from an emulated computer which could in turn output BASIC commands to be interpreted, which will make it possible to create a sort of operating system for the 3D environment that runs on a MAME or other Libretro vintage computer. This way it will be possible to control the system, like loading up new computers or arcade cabinet models, via Z80 or 6502 assembly language running on one of the MAME libretro cores.

  4. #4
    Controller Man ulaoulao's Avatar
    Join Date
    Dec 2005
    Location
    FL
    Posts
    3,260
    Blog Entries
    1

    Default Re: Programming experiment

    Irrlicht Engine. LOL cool. I made a metroid game with that. Here was the video.
    http://spawnlinux.ddns.net/DoCz/down...roid64/m64.avi
    Original, the only way to play.

    Forums
    main page - Working controllers

  5. #5
    Amateur Poster pix07's Avatar
    Join Date
    Jul 2016
    Location
    Poland
    Age
    27
    Posts
    110

    Default Re: Programming experiment

    really nice
    https://github.com/pix07
    "God made the integers, all else is the work of man "- Leopold Kronecker

  6. #6

    Default Re: Programming experiment

    Very cool. Were you able to use getMesh with an animated mesh for that transition into a ball thing? I have not actually used any animated meshes, but I am guessing there is are methods to play animations and specify certain keyframes or something? Or did you need to do something more complicated? I am planning on adding a command like ANIMATE to my Vintage BASIC to trigger animations on models. This type of thing is why I like Irrlicht even though it is pretty old -- it has features like easily loading animated models that simplify things for me trying to make a dynamic programmable environment.
    Also how did you create that animation? In Blender or Maya or something?

  7. #7
    Controller Man ulaoulao's Avatar
    Join Date
    Dec 2005
    Location
    FL
    Posts
    3,260
    Blog Entries
    1

    Default Re: Programming experiment

    Yes It took some doing but using the irreditor I was able to get all transformations. I actually had to modify the animator code to get reversals. Not sure they push my code change or not. I only used frame animations. I knew what frames had what and the animations where all on one time line. 0-10 stand 11-20 run, etc...

    Yes I did everything in maya. I used IK's and constrains for my rag doll I rigged up. I found the best tools to irr engine were irrwizard and irredit. They just made life easy for me
    Last edited by ulaoulao; August 2nd, 2017 at 14:35.
    Original, the only way to play.

    Forums
    main page - Working controllers

  8. #8

    Default Re: Programming experiment

    Well, the BASIC interpreter was too slow. So I changed to Lua. I still support line numbers though heh.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •