Login [Register]
Don't have an account? Register now to chat, post, use our tools, and much more.

What are you most excited for?
Career mode
 25%  [ 4 ]
Custom cars
 31%  [ 5 ]
Unlicensed cars
 6%  [ 1 ]
Quick races
 6%  [ 1 ]
Tuning
 25%  [ 4 ]
Other (post below)
 6%  [ 1 ]
Total Votes : 16

Iím pleased to announce that matkeller19, creator of Loopover CE and a multitude of handy equations programs for the CE, has volunteered to help on this project. So, DR1VE will be even better, and may be released faster, too.

Check out his profile here!
https://www.cemetech.net/forum/profile.php?mode=viewprofile&u=15625
C is working. Thanks to everyone who helped me install it!
Before I start the C rewrite for real, here's a screenshot of the ICE stuff I have so far. Shouldn't be too hard to rewrite, but here's the plan:
- make functions for things I use often and to replace parts of the program I am currently calling
- utilize decimals (happy to finally get these)
- add semicolons after everything (I know this sounds ignorant)
- focus on optimization in the rewrite

So here's the screenshot. I hope you enjoy! Please post feedback if you have any.


The EXP bar is probably too light now.
It look great! One thing I would recommend though is drawing to a buffer first, when you are transitioning between menus and stuff, because then you might have less flashy tearing (sorry if I explained that poorly)
Thanks for the feedback, Pieman7373! The reason hat happens is because when you return to the garage from a menu, det(0) is used to reset the screen. Within the menus, I used a buffer along with blitting to keep things relatively smooth. Iíll replace that det(0) with a Fillscreen(255) when I rewrite in C.
epsilon5 wrote:
Thanks for the feedback, Pieman7373! The reason hat happens is because when you return to the garage from a menu, det(0) is used to reset the screen. Within the menus, I used a buffer along with blitting to keep things relatively smooth. Iíll replace that det(0) with a Fillscreen(255) when I rewrite in C.


Did you know: gfx_Begin() is slower then gfx_FillScreen()?
(These routines are pretty much the same as the one ICE uses, IIRC)

Code:

lcd_init:
   call   ti.RunIndicOff
   di               ; turn off indicator
   call   lcd_clear
.setup:
   ld   a,ti.lcdBpp8
   ld   (ti.mpLcdCtrl),a      ; operate in 8bpp
   ld   hl,ti.mpLcdPalette
   ld   b,0
.loop:
   ld   d,b
   ld   a,b
   and   a,192
   srl   d
   rra
   ld   e,a
   ld   a,31
   and   a,b
   or   a,e
   ld   (hl),a
   inc   hl
   ld   (hl),d
   inc   hl
   inc   b
   jr   nz,.loop
   ret

^ is slower, and does more, than:

Code:

lcd_clear:
   ld   hl,ti.vRam
   ld   bc,((ti.lcdWidth * ti.lcdHeight) * 2) - 1
   jp ti.MemSet

Razz
Thatís pretty cool, beckadamtheinventor! Besides the speed gain you get from Fillscreen() that you mentioned, it also doesnít require you to use SetDrawLocation() or det(9) to set the draw location, which saves a few bytes. I changed it, and the flashing that Pieman7373 mentioned is now eliminated.

Also, that assembly code you posted reminds me of your assembly IcyCraft rewrite. Out of curiosity, any progress on that?
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 3 of 3
» All times are GMT - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement