To use the touhou 4 trial.hdi, follow these steps.

1.  Extract the file touhou 4 trial.hdi
2.  Open the file using the PC-98 emulator of your choice (I recommend T-98 Next, Neko Project 2 FMGen, or Anex86)
3.  Once you get your emulator loaded, go to the folder named "th04demo". 
4.  Press Enter on game.bat
5.  Once the game loads, just use the first option for everything in the setup.  (Z is enter, X is back)
6.  The game can now be played!

Other stuff:
If you want to modify the miko.cfg file, follow these steps.  (for this, I recommend Anex86 because the keyboard settings in Anex86 are more similar to Windows)

1.  In the th04demo folder, press E on the miko.cfg file, then press enter.
2.  You should see a screen with text like this:  ^A^C^C^B^A^@^@^@[EOF]
3.  Simply erase a letter from the line and replace it with a new one to modify it.  Remember to replace ^ that may gotten erased.
4.  To exit, press F1.  To save changes, press E in the menu F1 brought up.  To discard changes, press Q.  If it asks you something in the top right corner, press Y to exit.
5.  Go to game.bat and then go to the options to see what was changed!