alberthdev / wxwabbitemu

wxWabbitemu, a cross-platform TI-8x emulator based on Wabbitemu
Other
46 stars 12 forks source link

Create a ROM image using open source software #2

Closed C138 closed 7 years ago

C138 commented 9 years ago

Hi

I wonder why the option "Create à ROM..." does'nt work on my ubuntu box (after successfull compilation) while it works on wabbitemu/androïd ?

That is, I succeeded trying several roms on my smartphone... Where do they come from ??

PS : until now, I didn't succeed extracting the rom of my TI (TI-connect and tilp failed)

Thanks for any hint.

alberthdev commented 9 years ago

Hi there! Could you clarify? Are you talking about creating a ROM from scratch (e.g. using BootFree + an OS image) or creating a ROM from an existing calculator?

C138 commented 9 years ago

Ok, (sorry, the tiltle of my post is not clear, I agree, I just copy/paste the program option name)

a) I'm using wabbitemu/androïd, using the wizard, I select "Help me create a ROM using open source software". Next screen is the choice : TI-73 / ... TI-84 Plus / .... I select one of them, there is a download and after that, tada... I can use the choosen calculator ! b) Now, switching to my ubuntu box with wxwabbitemu freshly compiled, same process, after selecting "Create a ROM...", I reach the ROM Wizard choice panel (same TI-73/ ... TI84Plus SE), selecting one of them and ... at best, I'm able to open/see a web browser showing the End User License Agreement I'm also able to select a TI-OS version (e.g. 2.43 / 2.55SMP) but clicking on "Finish" do not start the download... (a file selector window is opened, like I have tho choose one on my box...)

So I was wondering why is wabbitemu able to perform automatic download of rom(?) while wxwabbitemu is not.

By the way, I was able to find a TI-83_Premium_CE-OS-5.0.8pu on the official website, but don't know what to do with it...

(oups : wabbitemu/androïd samsung galaxy note, not rooted ! ;-)

PS : I know wabbitemu is not exactly wxwabbitemu ;-) PS2 : sorry to ask these questions here but I didn't find a wxwabbitemu dedicated forum (I would like to stay on a linux native track ;-) Thanks

alberthdev commented 9 years ago

(a file selector window is opened, like I have tho choose one on my box...)

Hmm... the "window" you are talking about is asking you to save the ROM file that you want to create. Android's Wabbitemu does not ask that because it has a dedicated application specific folder it can save to, so it will happily save all of the ROM files there. (In the original Wabbitemu, this behavior is also mirrored.) In wxWabbitemu, you are asked to save it yourself so that you can figure out a good place to put it, since (at least when wxWabbitemu was written) on Linux, the application configuration folder was non-standard.

Try saving the ROM. Does it still work? I'm sorta having trouble with ROM saving, since it looks like the download is failing, and therefore crashing wxWabbitemu.

By the way, I was able to find a TI-83_Premium_CE-OS-5.0.8pu on the official website, but don't know what to do with it...

At this time, wxWabbitemu does not support the newer CE/CSE calculators - sorry! The project has stalled, so we would really appreciate some help in merging the newer CE/CSE code into wxWabbitemu!

I would like to stay on a linux native track ;-)

That's why this was created! :+1:

C138 commented 9 years ago

Yep, you're right... I also have a segfault (and sometimes, very quickly, a download error dialog... Anyway, what can we do with an 8Xu file ? (They are provided on the displayed web page from education.ti.com) These are not ".rom" files, right ?

Sorry, but I don't have real knowledge on this, I'm afraid I can't help you very much :-(

This is the model I have access (thanks to my wife, mathematics teacher). It's seems to be a french-market only(?) model. http://education.ti.com/fr/france/products/calculatrices-graphiques/ti-83-premium-ce/tabs/overview

geekbozu commented 9 years ago

Another random dev here. Sadly the new CE model calculators have no publicly available emulator for them as of now. There were some major hardware changes that is requiring quite the effort to get something working! That being said if you were tooling to emulate an older calculator we can point you towards those of files to make a rom with. But that being said currently there is no way to emulate the calc you linked shy of using Tis emulator which sadly the name escapes me as of the moment.

Types from my Droid RAZR Tim "Geekboy1011" keller On Apr 7, 2015 11:47 AM, "cabernet138" notifications@github.com wrote:

Yep, you're right... I also have a segfault (and sometimes, very quickly, a download error dialog... Anyway, what can we do with an 8Xu file ? (They are provided on the displayed web page from education.ti.com) These are not ".rom" files, right ?

Sorry, but I don't have real knowledge on this, I'm afraid I can't help you very much :-(

This is the model I have access (thanks to my wife, mathematics teacher). It's seems to be a french-market only(?) model.

http://education.ti.com/fr/france/products/calculatrices-graphiques/ti-83-premium-ce/tabs/overview

— Reply to this email directly or view it on GitHub https://github.com/alberthdev/wxwabbitemu/issues/2#issuecomment-90615907 .

alberthdev commented 9 years ago

Looks like @geekbozu answered a good chunk of your question, so I will answer the other part...

Yep, you're right... I also have a segfault (and sometimes, very quickly, a download error dialog...

Looks like there is indeed a bug in the setup wizard... probably a regression, since this code did work a while ago. (I'm not too sure what the cause is, though... not sure if it's due to the download actually failing, or if it's something else. Need to investigate!)

If you don't mind, could I rename this report? It looks like you found a bug! No guarantees on how soon I'll fix it, but this definitely belongs to my TODO list!

C138 commented 9 years ago

2015-04-08 7:34 GMT+02:00 Albert Huang notifications@github.com:

Looks like @geekbozu answered a good chunk of your question, so I will answer the other part...

Yep, you're right... I also have a segfault (and sometimes, very quickly, a download error dialog... Looks like there is indeed a bug in the setup wizard... probably a regression, since this code did work a while ago. (I'm not too sure what the cause is, though... not sure if it's due to the download actually failing, or if it's something else. Need to investigate!)

If you don't mind, could I rename this report?

of course

It looks like you found a bug! No guarantees on how soon I'll fix it, but this definitely belongs to my TODO list!

may be a change on the website side... !?

gibbly commented 8 years ago

I am having the same problem, I can add that it is due to a segfault. (ran it in a terminal)

Full disclosure: I had to remove all references to --version=2.8 from the makefile to make it compile (im using version 3.0 as I am in debian testing)

alberthdev commented 8 years ago

@gibbly This is with a regular TI-83/84 ROM, right? We do NOT support any newer CE/CSE ROMs at this time.

If you are indeed trying to create a TI-83/84 ROM, could you provide a stack trace, if possible?

To do that:

  1. Open a terminal.
  2. Run this command: gdb ./wxWabbitemu
  3. Type run and press ENTER.
  4. Do the ROM wizard and get it to crash.
  5. Once it crashes, copy the output from the crash.
  6. Type in bt and press ENTER.
  7. Copy the output from that command.
  8. Type continue and press ENTER.
  9. Type quit and press ENTER.
  10. Paste both outputs here!
gibbly commented 8 years ago

@alberthdev I am using a rom downloaded through the ui (ti 84 plus se os 2.55mp)

GNU gdb (Debian 7.10-1+b1) 7.10
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./wxWabbitemu...done.
(gdb) run
Starting program: /home/allen/gits/wxwabbitemu/bin/wxWabbitemu 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffec541700 (LWP 3427)]
[New Thread 0x7fffebd40700 (LWP 3428)]
[New Thread 0x7fffeb0fd700 (LWP 3429)]
[New Thread 0x7fffea8fc700 (LWP 3430)]
[New Thread 0x7fffea0fb700 (LWP 3431)]
[Thread 0x7fffeb0fd700 (LWP 3429) exited]
[Thread 0x7fffea8fc700 (LWP 3430) exited]
[New Thread 0x7fffea8fc700 (LWP 3432)]
[New Thread 0x7fffeb0fd700 (LWP 3433)]
[Thread 0x7fffea8fc700 (LWP 3432) exited]
[Thread 0x7fffea0fb700 (LWP 3431) exited]
[New Thread 0x7fffea0fb700 (LWP 3434)]

Program received signal SIGSEGV, Segmentation fault.
0x00000000004607df in RomWizard::DownloadOS (this=0x7fffffffdce0, 
    osFilePath=..., model=9, version=0 '\000')
    at ../gui/wizard/romwizard.cpp:157
157         while (!input->Eof()){
(gdb) bt
#0  0x00000000004607df in RomWizard::DownloadOS (this=0x7fffffffdce0, 
    osFilePath=..., model=9, version=0 '\000')
    at ../gui/wizard/romwizard.cpp:157
#1  0x0000000000460b28 in RomWizard::OnFinish (this=0x7fffffffdce0, event=...)
    at ../gui/wizard/romwizard.cpp:187
#2  0x00007ffff59e459e in wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, wxEvent&) const ()
   from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#3  0x00007ffff5b6aa77 in wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) ()
   from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#4  0x00007ffff5b6ab6b in wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#5  0x00007ffff5b6af1b in wxEvtHandler::TryHereOnly(wxEvent&) ()
   from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#6  0x00007ffff5b6afa3 in wxEvtHandler::ProcessEventLocally(wxEvent&) ()
   from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#7  0x00007ffff5b6b005 in wxEvtHandler::ProcessEvent(wxEvent&) ()
   from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#8  0x00007ffff6c66ae6 in wxWizard::ShowPage(wxWizardPage*, bool) ()
   from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_adv-3.0.so.0
#9  0x00007ffff6c61aff in wxWizard::OnBackOrNext(wxCommandEvent&) ()
   from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_adv-3.0.so.0
---Type <return> to continue, or q <return> to quit---continue
#10 0x00007ffff59e459e in wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, wxEvent&) const ()
   from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#11 0x00007ffff5b6aa77 in wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) ()
   from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#12 0x00007ffff5b6ab6b in wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#13 0x00007ffff5b6af1b in wxEvtHandler::TryHereOnly(wxEvent&) ()
   from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#14 0x00007ffff5b6afa3 in wxEvtHandler::ProcessEventLocally(wxEvent&) ()
   from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#15 0x00007ffff5b6b005 in wxEvtHandler::ProcessEvent(wxEvent&) ()
   from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#16 0x00007ffff670a7f8 in wxWindowBase::TryAfter(wxEvent&) ()
   from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#17 0x00007ffff5b6ad77 in wxEvtHandler::SafelyProcessEvent(wxEvent&) ()
   from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#18 0x00007ffff656b647 in ?? ()
   from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#19 0x00007ffff3fe51d4 in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#20 0x00007ffff3fff9a6 in g_signal_emit_valist ()
---Type <return> to continue, or q <return> to quit---exit
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#21 0x00007ffff400008f in g_signal_emit ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#22 0x00007ffff4569f75 in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#23 0x00007ffff3fe51d4 in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#24 0x00007ffff3fff9a6 in g_signal_emit_valist ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#25 0x00007ffff400008f in g_signal_emit ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#26 0x00007ffff4568eb9 in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#27 0x00007ffff460f9ec in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#28 0x00007ffff3fe4fa5 in g_closure_invoke ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#29 0x00007ffff3ff756e in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#30 0x00007ffff3fff7f9 in g_signal_emit_valist ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#31 0x00007ffff400008f in g_signal_emit ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
---Type <return> to continue, or q <return> to quit---quit
Quit
(gdb) 

I think I did that correctly.

alberthdev commented 8 years ago

@gibbly Thanks for the stack trace! I think I fixed the bug... this was triggered because TI changed their download URLs, and now they are broken. I added checks to prevent the crash from occurring, so it should no longer crash. Please test to make sure that this is now working!

However, there's a bigger issue at hand - it looks like the download function is now broken, even with the new URLs. This will take some time to fix, since the solution may require some extensive rework of the download code.

As a workaround, download the OS update file manually, and then select the file to create your ROM.

EDIT: I also fixed the Makefiles to use either 3.0 or 2.8, so it should now work without any edits.

gibbly commented 8 years ago

@alberthdev I can confirm that it shows an error on download instead of crashing.

the workaround is, well, working.

ids1024 commented 8 years ago

At this time, wxWabbitemu does not support the newer CE/CSE calculators - sorry! The project has stalled, so we would really appreciate some help in merging the newer CE/CSE code into wxWabbitemu!

@alberthdev How would one go about merging new code from Wabbitemu?

alberthdev commented 8 years ago

@gibbly: @ids1024 just submitted PR #4 - this might fix it for you! Please test the fix out, and if it works, let us know! Remind me sometime this week (Wednesday!), and I'll validate and merge in his PR when I get a chance.

@ids1024: If you go to the website, grab the latest SPASM code via SVN, and do a side-by-side diff, you can essentially merge the new code manually into wxWabbitemu. If anyone wants to try this, let me know and I can set up a branch specifically for this purpose! That said, to merge CSE support, we will also need to modify the GUI to specifically support it - otherwise, it will still display grayscale!

One clarification - CE support doesn't seem to exist upstream in the original Wabbitemu, so I apologize if I misled anyone! There's another project that I've been working on that has exclusively CE support: CEmu. (Not CSE, CE! CSE is available in upstream Wabbitemu!)

alberthdev commented 8 years ago

@ids1024: Unfortunately, it doesn't look like your PR will work...it looks like TI has moved to block downloads of their OSes (all links return 403 Unauthorized):

$ wget 'http://education.ti.com/download/en/US/956CE30854A74767893104FCDF195B76/32E99F6FAEB2424D8313B0DEE7B70791/TI73_OS.73u'--2016-05-17 09:11:50--  http://education.ti.com/download/en/US/956CE30854A74767893104FCDF195B76/32E99F6FAEB2424D8313B0DEE7B70791/TI73_OS.73u
Resolving education.ti.com (education.ti.com)... 23.196.140.140
Connecting to education.ti.com (education.ti.com)|23.196.140.140|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://education.ti.com/download/en/US/956CE30854A74767893104FCDF195B76/32E99F6FAEB2424D8313B0DEE7B70791/TI73_OS.73u [following]
--2016-05-17 09:11:50--  https://education.ti.com/download/en/US/956CE30854A74767893104FCDF195B76/32E99F6FAEB2424D8313B0DEE7B70791/TI73_OS.73u
Connecting to education.ti.com (education.ti.com)|23.196.140.140|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: /media/32E99F6FAEB2424D8313B0DEE7B70791/Files/Download%20Center/Software/73/TI73_OS.73u [following]
--2016-05-17 09:11:51--  https://education.ti.com/media/32E99F6FAEB2424D8313B0DEE7B70791/Files/Download%20Center/Software/73/TI73_OS.73u
Reusing existing connection to education.ti.com:443.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: /~/media/32E99F6FAEB2424D8313B0DEE7B70791 [following]
--2016-05-17 09:11:51--  https://education.ti.com/~/media/32E99F6FAEB2424D8313B0DEE7B70791
Reusing existing connection to education.ti.com:443.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: /en/us/error-403?aspxerrorpath=%2F~%2Fmedia%2F32E99F6FAEB2424D8313B0DEE7B70791 [following]
--2016-05-17 09:11:51--  https://education.ti.com/en/us/error-403?aspxerrorpath=%2F~%2Fmedia%2F32E99F6FAEB2424D8313B0DEE7B70791
Reusing existing connection to education.ti.com:443.
HTTP request sent, awaiting response... 403 Forbidden
2016-05-17 09:11:51 ERROR 403: Forbidden.

Even worse, the code currently used can't even detect this state! wxURL doesn't really know how to interpret 403s correctly, and proceeds to crash the program after loading the faulty file. Of course, the main bug here would be the fact that it crashes when loading something broken... but the other major bug is the fact that the downloader doesn't understand HTTP status codes, especially failure ones.

In summary, three bugs found:

alberthdev commented 8 years ago

Commit d03ba1a should fix the first issue of broken OSes causing the emulator to crash. As for the other two issues... because of the 3rd issue, I don't know if it's worth fixing the 2nd issue. (You could do some funky stuff with an embedded browser and/or cookie magic, but... it's a lot of work for not too much gain.) I may opt to remove the feature completely, and just point people to TI's website instead to download their OS. What do you think?

ids1024 commented 8 years ago

@alberthdev Embedding a browser is probably not worthwhile. Do you know what upstream wabbitemu is doing about it?

alberthdev commented 8 years ago

@ids1024 Taking a peek at upstream, it doesn't look like they addressed the issue yet... upsream's guiwizard.c still has the old URLs.

awertaz commented 8 years ago

Texas Instruments took down their OS files for download; that's why you cant create a ROM with an OS file. The only way you can use wabbitemu is to manually download a ROM file somewhere.

alberthdev commented 8 years ago

Can confirm - looks like it's 100% locked down now. The OS files are still available for certain calculators, but there no longer seems to be a way to automatically download them. Upsteam attempted to fix this in Feb 2016, but as of Aug 2016 (in fact, just a week ago!) has declared that this will no longer work.

Therefore, I went through the code and tore out all of the download related options and code. Since that took a lot of restructuring, I went through and cleaned up the wizard handling code as well to make it cleaner and hopefully more stable!

Since these changes are significant, I've placed them into the fix/romwizard-cleanup-nodl branch - please test this branch when you get a chance! (This includes everyone on this issue!)

EDIT: One more thing - the option has now been replaced with a button that takes you to the TI download page. See screenshot:

image

alberthdev commented 7 years ago

Merged into master and closing this issue! If there's any issues with this change, please let me know!