PeteE Posted February 28 Share Posted February 28 As some of you already know, I have been working on my own emulator for quite some time. Mostly as an educational endeavor to test my knowledge of how our lovely machine works, and also to benchmark my own opinionated optimizations and debugging techniques. It is written in C and uses SDL for display, and has a bespoke UI for cross-platform capability. I've gotten a lot of ideas from other emulators: Classic99 (thanks Tursi), JS99er (thanks Rasmus), DS99 (thanks Dave), 32blit-ti99 (thanks Erik) I'm not ready to publish binaries yet, but the code is here if you want to try compiling it yourself: https://github.com/peberlein/bulwip This is very much a work-in-progress, and I'm aware you can't do much with only cartridge support. I'm currently focused on making the debugger useful for developing cartridge software and showing a listing file to navigate while stepping through the code. 22 2 Quote Link to comment Share on other sites More sharing options...
PeteE Posted February 28 Author Share Posted February 28 @SteveB Quote My current approach works more or less with all emulators, as long you can identify the window to send the keys to. I will test in on @PeteE's BuLWiP emulator as soon as I get a pre-compiled version. I might test the option to use the clipboard, thank you for the hint. I'm already thinking about TiCodEd integration, and I tried implementing the Paste functionality that Classic99 uses. It seems to work except it exposed an emulation error when running XB. After I get that fixed I can send you a compiled binary to play with. Which OS do you use? 3 Quote Link to comment Share on other sites More sharing options...
jrhodes Posted February 28 Share Posted February 28 1 hour ago, PeteE said: As some of you already know, I have been working on my own emulator for quite some time. Mostly as an educational endeavor to test my knowledge of how our lovely machine works, and also to benchmark my own opinionated optimizations and debugging techniques. It is written in C and uses SDL for display, and has a bespoke UI for cross-platform capability. I've gotten a lot of ideas from other emulators: Classic99 (thanks Tursi), JS99er (thanks Rasmus), DS99 (thanks Dave), 32blit-ti99 (thanks Erik) I'm not ready to publish binaries yet, but the code is here if you want to try compiling it yourself: https://github.com/peberlein/bulwip This is very much a work-in-progress, and I'm aware you can't do much with only cartridge support. I'm currently focused on making the debugger useful for developing cartridge software and showing a listing file to navigate while stepping through the code. I have no idea what "BuLWiP" means, but... This is awesome news! Quote Link to comment Share on other sites More sharing options...
SteveB Posted February 28 Share Posted February 28 I usually use Windows and the keyboard-integration of TiCodEd use the Win32-API, so this feature is only available on Windows. If someone joins me for Linux "sending keystrokes from one app to another" I would try it there as well, but I am afraid this could be difficult as there are so many GUI Toolkits, Window-Manager etc. I don't have MacOS myself and @grammostola and I had not managed to get Lazaurs apps running on recent Apples, namely the M2. I would love to see an emulator where I can read the VDP RAM and send keyboard and joystick inputs... Quote Link to comment Share on other sites More sharing options...
jrhodes Posted February 28 Share Posted February 28 1 hour ago, PeteE said: ... Which OS do you use? 99.9% of the time, Linux. Ubuntu to be precise. And also a VM of windows XP "just in case". 1 Quote Link to comment Share on other sites More sharing options...
PeteE Posted February 28 Author Share Posted February 28 39 minutes ago, jrhodes said: I have no idea what "BuLWiP" means, but... This is awesome news! It's from the BLWP assembly instruction. For the application logo, I was thinking of picture of a bullwhip and a texas longhorn (not the sports team) 6 1 Quote Link to comment Share on other sites More sharing options...
GDMike Posted March 1 Share Posted March 1 32 minutes ago, PeteE said: It's from the BLWP assembly instruction. For the application logo, I was thinking of picture of a bullwhip and a texas longhorn (not the sports team) You wouldn't bullwip me would you? Bahaha 1 Quote Link to comment Share on other sites More sharing options...
+llabnip Posted March 1 Share Posted March 1 I’ve said it before but will repeat - your code is quite easy to read and understand. Also you get bonus points for having a TI emulator without two 9s in the name! 2 Quote Link to comment Share on other sites More sharing options...
+mizapf Posted March 1 Share Posted March 1 54 minutes ago, llabnip said: Also you get bonus points for having a TI emulator without two 9s in the name! I guess MAME does not count because you have to add the driver name "ti99_4a" in the command line. I thought "bullwhip" is a well-known nickname for BLWP. (I think I found it in some users group publication back in those days.) 3 1 Quote Link to comment Share on other sites More sharing options...
TheMole Posted March 1 Share Posted March 1 Compiles flawlessly on my mac, and seems to work great overall, except the crt filter (just gives me a black screen) and the debugger seems to have some rendering issues as well. But, super, super impressive! I love the LCD style UI elements! I love it, and will definitely keep testing this as you continue development. Perhaps some of the default shortcut key definitions are not a good fit for modern mac keyboards though, I can't remember the last time I've seen a "Home" key (I changed it to F6 in code temporarily to test the debugger). 2 Quote Link to comment Share on other sites More sharing options...
TheMole Posted March 1 Share Posted March 1 Quick question: what is the format of the listing file? Would it be possible to use the output from gcc, which you can tell to spit out assembly files with interleaved c source code? Quote Link to comment Share on other sites More sharing options...
+FarmerPotato Posted March 1 Share Posted March 1 I preferred to say it like "Bluh-wup" imagining that's what Munch Man was saying. Fun to see another emulator! Interested to see where you go with it PeteE as a developer tool! 1 Quote Link to comment Share on other sites More sharing options...
+OLD CS1 Posted March 1 Share Posted March 1 Cool Hwip.mp4 6 Quote Link to comment Share on other sites More sharing options...
+mizapf Posted March 1 Share Posted March 1 Oh ... geoblocked. Quote Link to comment Share on other sites More sharing options...
PeteE Posted March 1 Author Share Posted March 1 18 hours ago, llabnip said: I’ve said it before but will repeat - your code is quite easy to read and understand. Also you get bonus points for having a TI emulator without two 9s in the name! Thanks a lot! Your DS99 emulator code is exquisitely commented, and also a joy to read. 9 hours ago, TheMole said: Quick question: what is the format of the listing file? Would it be possible to use the output from gcc, which you can tell to spit out assembly files with interleaved c source code? The listing format follows the output by XAS99, although I did try one listing from GCC provided by Jedimatt42. If you DM me your listing I can try to make it work. 10 hours ago, TheMole said: Compiles flawlessly on my mac, and seems to work great overall, except the crt filter (just gives me a black screen) and the debugger seems to have some rendering issues as well. But, super, super impressive! I love the LCD style UI elements! I love it, and will definitely keep testing this as you continue development. Perhaps some of the default shortcut key definitions are not a good fit for modern mac keyboards though, I can't remember the last time I've seen a "Home" key (I changed it to F6 in code temporarily to test the debugger). I have the fix for the CRT filter, but haven't pushed it yet. The CRT filter tries to read from the SDL Texture, but it's supposed to be write-only. The fact that it works on PC is probably due to GPU driver differences. I'll add alternate keys for Mac keyboards, thanks the heads up. 3 Quote Link to comment Share on other sites More sharing options...
+OLD CS1 Posted March 1 Share Posted March 1 1 hour ago, mizapf said: Oh ... geoblocked. Fixed. 1 Quote Link to comment Share on other sites More sharing options...
+mizapf Posted March 1 Share Posted March 1 https://en.wikipedia.org/wiki/Pronunciation_of_English_〈wh〉 This is one thing they never taught us at school. 3 1 Quote Link to comment Share on other sites More sharing options...
GDMike Posted March 1 Share Posted March 1 (edited) I've got a question regarding CRC and it uses during the 80s and 90s within basic and some C program listings. And I thought I had also seen some CRC usage during the TI coding days in the late 90s as well. Why isn't it used in assembly, Forth and rxb and other languages that are used in today's programs? What did it do that it doesn't today? Edited March 1 by GDMike Quote Link to comment Share on other sites More sharing options...
+Lee Stewart Posted March 2 Share Posted March 2 1 hour ago, GDMike said: I've got a question regarding CRC and it uses during the 80s and 90s within basic and some C program listings. And I thought I had also seen some CRC usage during the TI coding days in the late 90s as well. Why isn't it used in assembly, Forth and rxb and other languages that are used in today's programs? What did it do that it doesn't today? Well, the E/A Assembler puts a checksum on every line of output (except the last line) for the E/A Loader to verify—not exactly a CRC, but a somewhat similar kind of check. ...lee 1 Quote Link to comment Share on other sites More sharing options...
HOME AUTOMATION Posted March 2 Share Posted March 2 Cyclic Redundancy Check, was used on the FDC, and Disk Manager... ...Above pic. is linked. Also... CRC 1 1 Quote Link to comment Share on other sites More sharing options...
GDMike Posted March 2 Share Posted March 2 (edited) So it's used in some places and not updatable? But modern machines take this very seriously as technology evolved. Edited March 2 by GDMike Quote Link to comment Share on other sites More sharing options...
TheMole Posted March 3 Share Posted March 3 On 3/2/2023 at 2:27 AM, PeteE said: The listing format follows the output by XAS99, although I did try one listing from GCC provided by Jedimatt42. If you DM me your listing I can try to make it work. Here's an example cart image and the output from objdump with (some) C code interspersed... For some reason there's large swaths of asm code without C code, but that's probably because I'm including a library that hasn't been compiled/built with the right C flags. Should still work for testing if this type of list format can be made to work with you debugger though... Oh, and the program itself assumes 80 column text mode on an F18A, so won't run correctly in the emulator... I hope that's not an issue for you. I just picked a small-ish project I had lying around. malloctest8.bin malloctest8.lst 1 Quote Link to comment Share on other sites More sharing options...
mr_gw454 Posted March 3 Share Posted March 3 I did try to compile this on my Linux Mint 20.1 system but ran into an error: ~/source/bulwip$ make cc -O3 -g -c -o bulwip.o bulwip.c cc -O3 -g -c -o cpu.o cpu.c cc -O3 -g -c -o ui.o ui.c cc -O3 -g -I/usr/include/SDL2 -D_REENTRANT -c -o sdl.o sdl.c sdl.c: In function ‘vdp_text_clear’: sdl.c:551:2: warning: implicit declaration of function ‘SDL_LockTextureToSurface’; did you mean ‘SDL_CreateTextureFromSurface’? [-Wimplicit-function-declaration] 551 | SDL_LockTextureToSurface(debug_texture, &rect, &surface); | ^~~~~~~~~~~~~~~~~~~~~~~~ | SDL_CreateTextureFromSurface cc -O3 -g -c -o NTSC-CRT/crt.o NTSC-CRT/crt.c NTSC-CRT/crt.c: In function ‘init_eq’: NTSC-CRT/crt.c:231:25: warning: right shift count is negative [-Wshift-count-negative] 231 | f->lf = 2 * (sn >> (15 - EQ_P)); | ^~ NTSC-CRT/crt.c:237:25: warning: right shift count is negative [-Wshift-count-negative] 237 | f->hf = 2 * (sn >> (15 - EQ_P)); | ^~ cc bulwip.o cpu.o ui.o sdl.o NTSC-CRT/crt.o -L/usr/lib/x86_64-linux-gnu -lSDL2 -o bulwip /usr/bin/ld: sdl.o: in function `vdp_text_clear': /home/ron/source/bulwip/sdl.c:551: undefined reference to `SDL_LockTextureToSurface' /usr/bin/ld: /home/ron/source/bulwip/sdl.c:551: undefined reference to `SDL_LockTextureToSurface' collect2: error: ld returned 1 exit status make: *** [<builtin>: bulwip] Error 1 Looks like it might be related to my version of SDL2? 2.0.10. Thanks! Quote Link to comment Share on other sites More sharing options...
Fredrik Öhrström Posted March 3 Share Posted March 3 Very nice! Compiles quickly and runs great! Quote Link to comment Share on other sites More sharing options...
apersson850 Posted March 3 Share Posted March 3 On 3/1/2023 at 12:27 AM, PeteE said: For the application logo, I was thinking of picture of <...> a Texas longhorn (not the sports team) Like this? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.