Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Danny

Pages: [1]
1
Share your code / Object Oriented C Programming Example
« on: October 15, 2017, 05:00:28 am »
Hi people!
I love programming with C but there are some concepts of object oriented programming that are very useful and are not natively supported like they are in C++.
This does not mean that they are not possible to apply in C!
I have made a small example that shows how to implement objects and polymorphism.
This example shows that it is possible to have different objects in an array while being able to use the same functionality on all of them.
I have just finished making this so it has no comments yet (sorry), but I will try to update it in the next few days.
I hope this is helpful for someone  :P

TO DO:
- Commenting code (there are some new comments but nothing really helpful).
- Build an automated tool to generate a skeleton source code

EDIT 1: Version 0.2
- Changed the object header to static, now all objects of the same type share the same header which saves memory.
- Added some defines to the object header to further simplify things.

EDIT 2: Version 0.3:
-Minor API changes to make it easier to understand.

2
Share your code / VDP2 3D Planes
« on: April 23, 2017, 12:45:42 am »
Hi friends, I have used the SGL directly to test the VDP2 3D planes with the objective of helping XL2 with his 3D sonic project.
The problem with this is  that its using the SGL directly and that it might screw up with the memory allocation of the JO-engine somehow, maybe this can also be done with the pseudo Mode7?
Johannes if this is possible could you provide a similar example to the one I'm sharing with the Mode7?

3
Share your code / Dual SH2 usage example
« on: April 09, 2017, 04:07:09 pm »
Hi dear friends!
After much digging around I figured out how to use the 2 SH2 CPUs, its rather simple actually but a light read on fork-join model is recommended to help grasp the concept.
Also, the Sega Saturn ram bus system does not have a bus snoop function so accessing shared stuff on the ram with both CPUs should be done carefully, either by doing a cache-through read (avoiding the CPU cache) or invalidating the whole CPU cache so you have fresh un-cached data available.
The source code for this "marvel" is in attachment, have fun and feel free to shoot any questions you have!

Note: Jo, I used 2 SGL function you might want to wrap around on your library:
- slSlaveFunc(void * pointer_to_function, void* pointer_to_function_parameter):
You can pass a single parameter to the function you are using but it will only work for the first so you can't use functions with more than one parameter, a work around for this is creating a struct and sending a pointer to the struct :P.
- slCashPurge():
This clears the Cache, I find it really funny how they mistook cash(Money) with Cache, probably Japanese translation errors?

4
General Jo Engine Help / Help setting up a project on CodeBlocks
« on: October 13, 2016, 01:40:08 pm »
Hi!
I have been programming with the Jo-Engine using Notepad++, since I'm used to program in C using Netbeans with the C/C++ plugin I tried to set up a project there without much success. I was wondering if it is easier to setup a project with Code::Blocks? The thing I miss most from netbeans is the ability to hold ctrl + left mouse click on the includes and the functions to jump to their location/definition.
If someone has done this before I would really appreciate some help :P.

Pages: [1]
SMF spam blocked by CleanTalk