Join us on Discord!
You can help CodeWalrus stay online by donating here.

CEmu

Started by MateoConLechuga, December 30, 2015, 08:39:56 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

MateoConLechuga

Hello everyone. :) Early last month I started work on a CE calculator emulator, and it has now progressed to a nice development stage. Jacobly, Adriweb, and Lionel were very helpful along the way, and fixed a lot of the bugs I always seemed to make, and of course did an amazing job at implementing a lot of the more wild things. But now it is in working stages; support for ROM dumping from a real calculator is supported, it can boot and operate exactly like a normal TI-OS, except for file transfers, which requires emulating USB, which will take some time. There is no release yet; only a source release (which you can build yourself and play with if you so desire), and if you have sufficient knowledge in anything you feel could help out, feel free to send a pull request my way or ask nicely and I can add you as a collaborator. :) Rather than talk some more about it; Adriweb came up with a nice article that will explain a lot, I hope. Still a lot to do, but yay.

So, give it a test drive, and report any bugs/features/comments that you have or would like implemented, and they will be added to the todo list. Enjoy. :)

It has its own ROM dumping method, much like the rom8x of days past, but now a nice GUI to tell you everything. And a progress bar. Those are cool. Of course, Lionel and jacobly added ROM dumping support to TILP here.

Source code on GitHub : https://github.com/MateoConLechuga/CEmu

Cross news post:

CEmu: What is it?
To sum up: a portable and open-source TI-84 Plus CE and TI-83 Premium CE emulator.

The 84+CE and 83PCE (TI-eZ80 series) hit the market over half a year ago. However, there was no third-party emulator, and the official emulator in TI-SmartView CE does not provide the features most community programmers have come to expect from well-behaved emulators: an accurate emulation core, a debugger with a way to inspect and modify registers and memory, a disassembler, etc. Teachers, who are SmartView's main target audience, hardly need such features.
The lack of a proper emulator is a significant roadblock to making TI-eZ80 native code programming popular in the community, which is a shame because the platform is a great improvement over the 84+CSE: faster CPU, more RAM, etc. Therefore, for the community's sake, such a situation shouldn't last for long - hence, the making of an emulator ;)

CEmu is open source (and even free software, under the GPLv3), like nearly all community-made emulators, and made in C/C++. A native code emulator makes perfect sense for both efficiency and versatility; in the longer term, retargeting the code at browsers (JavaScript, WebAssembly) is possible nowadays, thanks to Emscripten.

The team behind CEmu
Matt "MateoConLechuga" Waltz started the project and remains the main contributor.
More recently, Jacob "jacobly" Young was invited to join the fun, and he has so far worked quite a bit on improving the CPU and ASIC core (as well as integration thereof with the UI), mainly.
The CEmu code base leverages both Firebird (TI-Nspire emulator) and z80e (TI-Z80 emulator for KnightOS, and to which jacobly is a contributor) open-source projects.
There are also other contributions, from non-TI-(e)Z80 experts: Adrien "Adriweb" Bertrand, Lionel Debroux, Fabian "Vogtinator" Vogt.
And in the future... well, potentially anyone with sufficient knowledge, that's precisely part of the power of open source :)

If you want to chat, we're on IRC (EFNet), on channels such as #ez80-dev and #cemu-dev :)

Features
  • Portable emulation core written in C
  • Decent emulation accuracy yielding the ability to boot all of TI's CE OS's, browse around, execute self test successfully, and run programs.
  • Portable GUI written in C++ using Qt (making it run on Windows, Mac OS X, Linux, Android, and iOS!)
  • Docks/Tabs-based graphical UI (which you are able to customize)
  • Integrated setup wizard with ROM dumper for your calculator (there's another one in TILP beta)
  • Simple debugger (read CPU registers, flags, ASIC state) and port monitor/writer
  • Animated (GIF) and still (PNG) screenshots
What it looks like
Here is what a recent build on Mac OS X looks like:

Of course, using the docking system, all windows are completely resizeable, movable, and translatable.

Short-term todo list
  • Continue implementing the ASIC emulation core: remaining devices/ports, etc.
  • Implement file transfers (implementing USB is not an easy task, so that will probably take a while)
  • Make the debugger more useful: disassembly view, stepping, breakpoints...
  • Finish 83PCE support (e.g. keypad and skin - emulating the 83PCE already works)
  • Test the emulator and hunt bugs, even more!
In the future...
  • Provide more translations (for now, it's available in English and French). If you want to help, tell us, or send patches / pull requests!
  • Make a web-based version of CEmu, like there's a web-based version of z80e for trying out KnightOS. Compiling the CEmu core to JavaScript (and later WebAssembly), using Emscripten, is already known to work: Adriweb has been able to get an Emscriptened CEmu core to boot a ROM and get to the home screen (confirmed by dumping the LCD buffer) :)
  • Think about CEmu's core's integration on third-party projects, like TI-Planet's Project Builder - for instance, in C projects, in order to directly test the program, and eventually (if someone has enough time...) have live source-level debugging!
  • Look at this gdb-z80 project (code from 2011...); try to see if it can be updated for eZ80, and used with a CEmu GDB stub. Mainlining such code is highly preferable.
  • ...
Conclusion
To sum up: CEmu is the community's open-source, native, portable, TI-84 Plus CE / TI-83 Premium CE emulator, that has been developed over the past few weeks, and of course, still is currently under development.
We all hope you'll enjoy it :)

Download : Soon ! There is no binaries to download yet, you'll have to be a little more patient ;)
Source code on GitHub : https://github.com/MateoConLechuga/CEmu

In the meantime, you can simply build one yourself from the source code (instructions here)

Merry (belated) Christmas! :)

Snektron

whoa, thats really awesome :D Nice job you did there :)
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


Adriweb

Even though I was a little bit involved in the dev too, congratulations, especially to Mateo and Jacobly :D
  • Calculators owned: TI-Nspire CX CAS, TI-Nspire CX, TI-Nspire CAS (x3), TI-Nspire (x2), TI-Nspire CM-C CAS, TI-Nspire CAS+, TI-80, TI-82 Stats.fr, TI-82 Plus, TI-83 Plus, TI-83 Plus.fr USB, TI-84+, TI-84+ Pocket SE, TI-84+ C Silver Edition, TI-84 Plus CE, TI-89 Titanium, TI-86, TI-Voyage 200, TI-Collège Plus, TI-Collège Plus Solaire, 3 HP, some Casios
Co-founder & co-administrator of TI-Planet and Inspired-Lua

novenary

#3
Good job on this one guys. :D
Now @DJ Omnimaga can't complain anymore : P

By the way regarding licensing, the MIT license requires you to include the full copyright line like so for z80e code: "Copyright (c) 2014 The KnightOS Group", not sure how the GPL works for Firebird/libti* code but I think "many thanks" is not enough from a legal point of view.
I don't want you guys to get in trouble (even though I don't think the original authors would bother taking legal action against you for this).

Adriweb

#4
Quote from: Streetwalrus on December 30, 2015, 09:37:02 AMBy the way regarding licensing, the MIT license requires you to include the full copyright line like so for z80e code: "Copyright (c) 2014 The KnightOS Group", not sure how the GPL works for Firebird/libti* code but I think "many thanks" is not enough from a legal point of view.
I don't want you guys to get in trouble (even though I don't think the original authors would bother taking legal action against you for this).
Yep, apparently we forgot to do the proper required acks. Should be fixed in a few minutes :)

Edit: well, IANAL but with this commit, it's probably better. it's open to PRs anyway, so anyone who can do better, well, just propose the change :)
  • Calculators owned: TI-Nspire CX CAS, TI-Nspire CX, TI-Nspire CAS (x3), TI-Nspire (x2), TI-Nspire CM-C CAS, TI-Nspire CAS+, TI-80, TI-82 Stats.fr, TI-82 Plus, TI-83 Plus, TI-83 Plus.fr USB, TI-84+, TI-84+ Pocket SE, TI-84+ C Silver Edition, TI-84 Plus CE, TI-89 Titanium, TI-86, TI-Voyage 200, TI-Collège Plus, TI-Collège Plus Solaire, 3 HP, some Casios
Co-founder & co-administrator of TI-Planet and Inspired-Lua

novenary

Cool. I'm not a lawyer either but this should clarify things. I know that re-licensing MIT code to GPL is ok since the former is a permissive license though.

SirCmpwn

Nice work! I looked through the code, though, and the licensing issues are still not quite right. In the readme, it says that the code is "inspired" by z80e, which seems to be untrue - this looks like you started with a copy of the z80e code and modified it, so you need to avoid implying that it's an original creation that was "inspired" by the z80e code. You should copy and paste all of the licenses into your LICENSE file and include a summary of what code came from which project. Check this out for an example:

https://github.com/KnightOS/libc/blob/master/LICENSE

Also, if you're interested in contributing your improvements to CE support in z80e upstream, then it'd be nice if you called out what portions of the code are GPL'd and what portions are MIT licensed, so that we know what we can integrate upstream.

Adriweb

#7
Well I haven't myself contributed to the core, so I wouldn't know all the details (nor how compatible it would be for merging some things upstream), but yes, some parts are directly taken from z80e and Firebird.
If it's just a phrasing issue and a matter of copying the proper license text, though, this can be fixed quickly.

Edit : proper license copies in appropriate files now done, by mateo in this commit.
  • Calculators owned: TI-Nspire CX CAS, TI-Nspire CX, TI-Nspire CAS (x3), TI-Nspire (x2), TI-Nspire CM-C CAS, TI-Nspire CAS+, TI-80, TI-82 Stats.fr, TI-82 Plus, TI-83 Plus, TI-83 Plus.fr USB, TI-84+, TI-84+ Pocket SE, TI-84+ C Silver Edition, TI-84 Plus CE, TI-89 Titanium, TI-86, TI-Voyage 200, TI-Collège Plus, TI-Collège Plus Solaire, 3 HP, some Casios
Co-founder & co-administrator of TI-Planet and Inspired-Lua

Lionel Debroux

The project uses GPLv3 code; everything is built by the same Makefile and linked together statically.
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TIEmu and TILP.
Co-admin of TI-Planet.

Dream of Omnimaga

Awesome news Mateo and great job to everyone who participated to the development of this emulator. Not to mention that it's open-source, so people will still be able to maintain it even when the original authors are inactive. :)

Thanks for the cross-post as well. Hopefully when this emulator will have full file transfer support (unless it does already?) it will kickstart CE development (a lot of people were not interested because there was no emulator available) :)
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Yuki

Looks interesting. Fun fact, if you have Arch Linux, you should be able to get cemu-git from the AUR.
  • Calculators owned: TI-83+ (dead?), Casio Prizm (also dead???)
  • Consoles, mobile devices and vintage computers owned: A lot
Read Zarmina!
YUKI-CHAAAANNNN
In the beginning there was walrii. In the end there will be walrii. All hail our supreme leader :walrii: --Snektron

if you wanna throw money at me and/or CodeWalrus monthly it's here

Dream of Omnimaga

That reminds me, while there are no binaries available yet, can compiling the source allow us to run the emulator on Windows immediately?
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Snektron

i had a quick try at it but it couldn't find my compilers, though it vould find the debuggers.
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


Lionel Debroux

Quotecan compiling the source allow us to run the emulator on Windows immediately?
Yup, the MinGW-based Qt SDK works. Support for older, broken versions of MSVC is in progress.
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TIEmu and TILP.
Co-admin of TI-Planet.

Dream of Omnimaga

Ah that's good then. :) I don't need it immediately but if I start coding again soon then it could be handy :) (if I manage to compile it, that is :P)
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Powered by EzPortal